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

COUNT DISTINCT SHOWS WRONG GRAND TOTAL

Hey 

screeen.PNGHey My grand total is wrong when using distinct count, if the visualisation is a matrix, table or any. The grand totalt is wrong. my dax formel is 

User Distinct = DISTINCTCOUNT(table[UserId] )

There are many users who do different operations, one user can do a operation 4-5 times and etc.. but i want to have it distinct. But the sum when i filter it with a slicer or any other thing, it shows the row value correct, but the grand totalt is wrong! 

NEED HELP ASAP! 


thanx in advance, 

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

Hi @Anonymous,

 

In your scenario, the measure will evaluate who column [UserId] and count distinct values on Total row of the table visual, instead of sum each measure row values. 

 

If you would like to place total of each measure value on Total row, you can modify the measure below: 

User Distinct = var t=SUMMARIZE('Table5','Table5'[Operation],"UserDistinct",DISTINCTCOUNT(Table5[UserID] ))
return
SUMX(t,[UserDistinct])

 

q1.PNG

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous,

 

In your scenario, the measure will evaluate who column [UserId] and count distinct values on Total row of the table visual, instead of sum each measure row values. 

 

If you would like to place total of each measure value on Total row, you can modify the measure below: 

User Distinct = var t=SUMMARIZE('Table5','Table5'[Operation],"UserDistinct",DISTINCTCOUNT(Table5[UserID] ))
return
SUMX(t,[UserDistinct])

 

q1.PNG

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-qiuyu-msft ,

 

If suppose I want overall disticount Not sum of user id distinctcount then that time what should I do?

 

Thanks,

 

Arvind

Hi @v-qiuyu-msft ,
If we include another column lets say 'Operation Category' then in the below query I have to replace the 'Operation' with 'Operation category' level table.
So, instead for changing this query again & again, Is there anyway it can calculate the distinct count according to the columns('Operation' or 'Operation category') we use in the table & the Grand total row sum it accordingly ?

User Distinct = var t=SUMMARIZE('Table5','Table5'[Operation],"UserDistinct",DISTINCTCOUNT(Table5[UserID] ))
return
SUMX(t,[UserDistinct])

Anonymous
Not applicable

Hi, how would a measure that calculates the % of the Total (Operation 1 = 25%, 5=12,5%) look like?

 

Best regards,

 

Chris

Hi There!

 

I have to do the same but filter it between two dates using slicers as my filters 

 

for an e.g. count of distinct operations but for last week and previous last week and cannot apply the filter on the summarization though. 

Anonymous
Not applicable

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.