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

Sum distinct values per category

I am calculating distinct id for each category and get this table which is correct and how I would like it. But when Power BI is calculating the total it seems like it is calculating the distinct id over all, without taking into account that some IDs are within multiple categories. I would like the total to be 5+6+2=13 but instead the total is 8 since a lot of IDs are in multiple categories. 

 

Categorydistinct count
cat 15
cat 26
cat 3 2
total 8

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try like

sumx(values(Table[Category]),[distinct count])

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Try like

sumx(values(Table[Category]),[distinct count])

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.