Number chart with distinct count | XM Community
Skip to main content
Question

Number chart with distinct count


Forum|alt.badge.img+3

HI,
I should insert an indicator in the dashboard that shows me how many times there are unique values in the dataset with respect to a certain embedded data.
Example I have 4 answers with an embedded data ProjectCode valued like this:

ax11122
ax11122
ax11123
ax11124

The count distinct should return 3 because there are 4 answers with 3 unique values of the embedded data ProjectCode.

How can I set a "number chart" to return this result?

Thank you

7 replies

Mishraji
Level 4 ●●●●
Forum|alt.badge.img+18
  • Level 4 ●●●●
  • 236 replies
  • April 21, 2023

@vizz - Not sure if there is an easy way to do this, I have been trying to figure out a way myself. 

The only way that I can think of is using custom metric. To implement a solution using that, do you know the possible values that the embedded data ‘ProjectCode’ can have? If yes, is this a very big number?


Forum|alt.badge.img+3
  • Author
  • 1 reply
  • April 21, 2023

Hi @Mishraji  thanks for your reply.
Unfortunately, the values are not known in advance and could be many


Forum|alt.badge.img+3
  • Level 3 ●●●
  • 84 replies
  • November 1, 2023

Were you able to solve this ? Even I have a similar requirement.


Forum|alt.badge.img+1

I am in need of a solution for this as well. Is there a way to display a distinct count of a particular embedded data field on a dashboard?


Forum|alt.badge.img+3
  • Level 3 ●●●
  • 84 replies
  • December 3, 2024

@megan.clawson , the only way I could think of was to load the survey data into an imported data project at the granularity of dimension that we would like to count. And then use it as a datasource in dashboard. But if you want count of multiple dimensions more granular than the first one, even imported data project would not work. Hope it helps.


Forum|alt.badge.img+1

@vizz , ​@Mishraji , ​@Neha Tank Here is how we were able to accomplish this. For our purposes, I wanted to be able to display an unduplicated count of students served in a tutoring program. Each time a teacher met with a student, the teacher logged the interaction by completing the survey, which asked for the student ID#. Using a survey workflow, the student ID# was added to a directory contact list where the student ID# was the external data reference. The directory has identity resolution rules in place to merge contacts with duplicate external data references. So, regardless of how many times a teacher met with and logged their interaction with a student, the student’s ID# would only exist one time in the directory. I also used a survey workflow to add an embedded data field to the directory: Tutoring=Yes. I published the external data reference and Tutoring field, added the directory as a second dashboard data source, and mapped them to the dashboard. I then added the number chart widget and used a filter for just the students for which Tutoring = Yes.

Hope maybe that helps!


Forum|alt.badge.img+3
  • Level 3 ●●●
  • 84 replies
  • March 5, 2025

@megan.clawson , Wow. This is interesting.

I thought of earlier in similar fashion but instead of Directory, I was thinking of imported data project. But somehow I wasn’t finding it reliable enough.

I shall give this idea a try.

Thanks.


Leave a Reply