cancel
Showing results for 
Search instead for 
Did you mean: 
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

Accepted Solutions
kcantor Community Champion
Community Champion

Re: Wrong measure total is affecting other measure: help!

@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 Datanaut!




View solution in original post

1 REPLY 1
kcantor Community Champion
Community Champion

Re: Wrong measure total is affecting other measure: help!

@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 Datanaut!




View solution in original post

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Top Solution Authors
Top Kudoed Authors