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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Qotsa
Helper V
Helper V

Sum of Distinct Values

Hi,

 

I have 2 columns, Week & Distinct User ID.

 

User ID is a Distinctcount of Users ID.

 

How do I sum these?

 

476 + 486 + 483 etc...frff.png 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

That's a pretty common scenario, as your measure total won't sum up the single amounts. 

That happens because your distinctcount will count the distinct values when filtered by week, but on the total, it doesn't simply sum the cells, but removes the week filter (so will be a distinctcount on all weeks, hence 644).

Here's a link for you: https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/td-p/547907

 

The solution is basically to precalculate the table in memory, and use the summed amount (in memory) as the total.

View solution in original post

3 REPLIES 3
ChandeepChhabra
Impactful Individual
Impactful Individual

Write a measure

Used ID SUM = 
SUM(TableName[User ID])

and drag it to your visual

Hi @ChandeepChhabra ,

 

Not exactly what I need.

 

I have the distinctcount of all user id's. I need to sum all these together.

Anonymous
Not applicable

That's a pretty common scenario, as your measure total won't sum up the single amounts. 

That happens because your distinctcount will count the distinct values when filtered by week, but on the total, it doesn't simply sum the cells, but removes the week filter (so will be a distinctcount on all weeks, hence 644).

Here's a link for you: https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/td-p/547907

 

The solution is basically to precalculate the table in memory, and use the summed amount (in memory) as the total.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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