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

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?

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


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 = dff'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