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
edtm
Frequent Visitor

Total Not Adding Up - Price Volume Matrix Waterfall

Hello.

 

I am attempting to build a price volume matrix waterfall.  In the image below, I did all the calculations in the first table.  And, I created a check table in the table below it.  The "Combined" amounts add up correctly but the Mix/Price/Volume elements are not.  How could I fix this? 

 

edtm_0-1707353982111.png

Sample file below:

Waterfall

 

Thanks!  Ed

1 ACCEPTED SOLUTION
WinterMist
Impactful Individual
Impactful Individual

@edtm & @gigantor28 

 

Thanks for the access!

 

So the key learning item here is that Power BI does not calculate the Total row as a SUM of the row values.

(This has been annoying for me as well.)

Instead, it performs the calculation in the Total Row filter context, completely ignoring all other rows.

This often results in a Total Amount which is NOT the SUM of the row values.

 

Anyway, to get around this, we just need to:

 

1) Put the base calculation in its own measure.

2) Create another measure which does a SUMX over the first measure, thereby creating Context Transition.

 

NOTE: SUMX essentially iterates over the values (in this case we want to iterate over Device Type), and simply sum the values.

 

Step 1) Create measures with just the base calculations.

 

WinterMist_0-1707424423462.png

 

WinterMist_1-1707424445016.png

 

WinterMist_2-1707424471197.png

 

Step 2) Now call each of those measures,

- performing the regular measure IF Device Type is filtered (i.e. if it's NOT the total row)

- OR performing the override SUM OF TOTAL ROW VALUES if Device Type is NOT filtered (i.e. it IS the total row.)

 

WinterMist_3-1707424672954.png

 

WinterMist_4-1707424700226.png

 

WinterMist_5-1707424727983.png

 

 

RESULT: As you can see, the total row now shows the SUM of row values for each measure.

 

WinterMist_6-1707424804351.png

 

 

Hope this is helpful to you!

Nathan

 

 

View solution in original post

8 REPLIES 8
WinterMist
Impactful Individual
Impactful Individual

@edtm & @gigantor28 

 

Thanks for the access!

 

So the key learning item here is that Power BI does not calculate the Total row as a SUM of the row values.

(This has been annoying for me as well.)

Instead, it performs the calculation in the Total Row filter context, completely ignoring all other rows.

This often results in a Total Amount which is NOT the SUM of the row values.

 

Anyway, to get around this, we just need to:

 

1) Put the base calculation in its own measure.

2) Create another measure which does a SUMX over the first measure, thereby creating Context Transition.

 

NOTE: SUMX essentially iterates over the values (in this case we want to iterate over Device Type), and simply sum the values.

 

Step 1) Create measures with just the base calculations.

 

WinterMist_0-1707424423462.png

 

WinterMist_1-1707424445016.png

 

WinterMist_2-1707424471197.png

 

Step 2) Now call each of those measures,

- performing the regular measure IF Device Type is filtered (i.e. if it's NOT the total row)

- OR performing the override SUM OF TOTAL ROW VALUES if Device Type is NOT filtered (i.e. it IS the total row.)

 

WinterMist_3-1707424672954.png

 

WinterMist_4-1707424700226.png

 

WinterMist_5-1707424727983.png

 

 

RESULT: As you can see, the total row now shows the SUM of row values for each measure.

 

WinterMist_6-1707424804351.png

 

 

Hope this is helpful to you!

Nathan

 

 

Thank you!  I was actually able to solve the issue after watching the video you linked in your other reply.  But, thank you for adding additional context into this reply. 

what happens to the above result if you change dimensions instead of device type ,

 

WinterMist
Impactful Individual
Impactful Individual

@edtm 

 

Btw, just requested permission to the link you shared.  It said I did not have permission.

 

Thanks,

Nathan

permission granted

WinterMist
Impactful Individual
Impactful Individual

@edtm 

 

My apologies, after using Excel to SUM, I realized the problem is simply the classic total does not equal the sum of row values Power BI behavior.  

 

Please watch this video.   It provides the solution.

 

Regards,

Nathan

 

https://www.youtube.com/watch?v=wHAWZzVS48Q

 

WinterMist_0-1707410392154.png

 

 

WinterMist
Impactful Individual
Impactful Individual

@edtm 

 

1) Would it be possible for you to upload the PBIX to Google Drive, and share the link here?  (I no longer have a DropBox account.)

 

2) If it is not possible to share the PROD PBIX, can you share:

- a small TEST data set PBIX that is still able to reproduce the mismatch problem

- The measures for at least 2 of the mismatched pairings.

   - Analysis Mix vs. Check Mix

   - Analysis Price vs. Check Price

   - Analysis Volume vs. Check Volume

 

Problems like this typically have to do with Filter Context.

 

Regards,

Nathan

@WinterMist 

 

Here you go:

Waterfall 

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.