Distinct Count (Custom Metrics) | XM Community
Skip to main content
Question

Distinct Count (Custom Metrics)

  • February 21, 2024
  • 2 replies
  • 198 views

Martin_O
Level 2 ●●
Forum|alt.badge.img+11

When creating a Custom Metric in a CX Dashboard is there any way to do a distinct count? I have a number that is entered by survey participants and is unique to them.  Occasionally we have repeat participants and I want to be able to create a data viz for certain fields that shows a distinct count of responses.  It seems like this should be an easy thing to do, but I can’t see any way of doing this? Any suggestions?

2 replies

Forum|alt.badge.img+2
  • 3 replies
  • May 8, 2024

Also looking for a way to count distinct IDs stored in metadata on the survey record. 


w.patrick.gale
Level 3 ●●●
Forum|alt.badge.img+13
  • Level 3 ●●●
  • 136 replies
  • September 5, 2024

This is not possible in Qualtrics. I download the data, via the API or manually, then write Python scripts in a Jupyter notebook to parse distinct counts, etc. An example of the Python to do this would be:

 

import pandas as pd

df = pd.DataFrame({'col1': [1, 2, 1, 3]})
unique_values = df['col1'].unique()
print(unique_values)

# to pull in Qualtrics CSV export data you would do something like

df = pd.read_csv('QualtricsData.csv')

 


Leave a Reply