Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

DISTINCT COUNT not visualizing accurately

Hi there,

 

I am working on a report for our social services division and they want to see demographics of distinct program participants. When I create this using the COUNT (DISTINCT) function using the standard Values options, the matrix shows inaccurate row data but an accurate distinct grand total. I am building this distinct counting the Unique ID for each participant created by our database.

 

DemographicDistinct
A1321
B1071
C539
D322
E239
F164
G82
H65
I46
J36
K5
L5
M2
Total3758

 

If you add up the rows, it equals 3897 not 3758 which confuses the end-user or anyone trying to intelligently analyze this data. The duplicated value is 4879, so it's not the full duplicated amount either and it's not the accurate distinct count - it is somewhere in between. These demographics are not multi-check options (only one Unique ID is assigned to one Demographic variable). Help! I searched all over this forum and none of the suggested measures worked.

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

I think this is by default. As there should be some same IDs for different Demographic in your data. So aiming to get the correct result, we should create a measure based on [Distinct].

 

Distinctcorrect = sumx(your table, [Distinct])

If the issue still occur, kindly share your pbix to me. Please upload your files to One Drive and share the link here.

 

Regards,
Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

3 REPLIES 3
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

Assuming your data looks like that. And I created relationship between two tables based on Demographic. I create a measure to get the distinctcount of category. 

 

distincount = DISTINCTCOUNT(Table2[category])

After new another measure.

 

Measure = SUMX(Table2,[distincount])

Please refer to the results as the picture below. If your data is not like this, Could you please create a sample and share the data to me. You can upload the files to One Drive and share the link here.

Capture.PNGRegards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

I think this is by default. As there should be some same IDs for different Demographic in your data. So aiming to get the correct result, we should create a measure based on [Distinct].

 

Distinctcorrect = sumx(your table, [Distinct])

If the issue still occur, kindly share your pbix to me. Please upload your files to One Drive and share the link here.

 

Regards,
Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Hi @v-frfei-msft ,

 

I cannot share my pbix as the data involves PII. Since the field containing the demographic data does not allow for multiple values, I am not sure how as you said "be some same IDs for different Demographic in your data". 

 

To be clear, did your measure mean to be formatted like this?

 

Distinctcorrect = SUMX('My_table_name', [UniqueID])

 

If so, that did not work. If I misinterpreted what you wrote, feel free to clarify. Thanks.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.