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
Paulien1989
Advocate II
Advocate II

Wrong measure total is affecting other measure: help!

I browsed the forum but I couldn't find a solution for my particular case.

 

power bi help.JPG

 

Measure "time in days / number" (if time in days >=1) is dividing the sum of 'time in days' by 'number'. 'Number' is a measure: distinctcount of column ID where 'time in days' >=1. On a row level, everything works fine. But the (sub)totals are all wrong: the total of column Number says 15 while it should be 6! And so my 'time in days / number' measure is showing 4,23 while it should be 10,57. 

 

How can I make sure that the column Number is giving me the right (sub)total?

1 ACCEPTED SOLUTION
kcantor
Community Champion
Community Champion

@Paulien1989 

Your totals are not incorrect, per se, they are just not behaving as you expect. One of the biggest differences with DAX and working in Excel is that each cell is calculated based upon its own merits and these merits do not always add up. Your dax just needs to be adjusted to account for this by using either ISFILTERED, HASONEVALUE, or the VALUES function.

This blog article has fantastic coverage of the solutions for this. https://powerpivotpro.com/2012/03/subtotals-and-grand-totals-that-add-up-correctly/

Hope this helps.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
kcantor
Community Champion
Community Champion

@Paulien1989 

Your totals are not incorrect, per se, they are just not behaving as you expect. One of the biggest differences with DAX and working in Excel is that each cell is calculated based upon its own merits and these merits do not always add up. Your dax just needs to be adjusted to account for this by using either ISFILTERED, HASONEVALUE, or the VALUES function.

This blog article has fantastic coverage of the solutions for this. https://powerpivotpro.com/2012/03/subtotals-and-grand-totals-that-add-up-correctly/

Hope this helps.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.