Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
In the following matrix visual the hierarchy margin % column subtotals are summing rather than recalculating for each level in the hierarchy (margin in red should be calc'd as (7,553/42,355=17.8%) not summed from the lines in blue (31+4.2+18=53.2%). The margin amounts for the lines in blue are correct (5,081/16,392=31%). I am hoping this can be corrected in some way. I have already tried disabling summation, rewriting the DAX expression using a calculated column, but not having any luck changing the percentage column subtotals in the matrix for the hierarchy . Help is appreciated!
Solved! Go to Solution.
How are you calculating Margin? I created a mock-up where I'm getting different results? Try this Measure for Margin instead?
Proud to give back to the community!
Thank You!
Replying to move this thread back to the top and keep it alive. Based on what i'm seeing in your DAX code, you may need to post a sample of you dataset so we can test further...
Proud to give back to the community!
Thank You!
Sorry to quick on the reply trigger...
Margin calc'd as follows...
Having difficulties w/ SUM...
Thanks for the continued help....
Check out this useful guide about Totals and Power BI Visuals. It's not uncommon that you need more control over the Matrix 'default' math. Using 'HasOneValue' in some IF logic helps you choose how you want Detail vs. Summary rows to calculate... I hope this helps!
https://blog.enterprisedna.co/getting-totals-correct-when-using-advanced-logic/
Proud to give back to the community!
Thank You!
I tried HASONEVALUE (using the last field in the hierarchy) and got the same result. Any suggestions?
How are you calculating Margin? I created a mock-up where I'm getting different results? Try this Measure for Margin instead?
Proud to give back to the community!
Thank You!
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 48 | |
| 46 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 67 | |
| 32 | |
| 27 | |
| 26 |