cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Resolver I

## PBI Matrix Percentage Column Subtotals and Totals Incorrect for Hierarchy

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!

1 ACCEPTED SOLUTION
Resident Rockstar

How are you calculating Margin?  I created a mock-up where I'm getting different results?  Try this Measure for Margin instead?

Please give Kudos or Mark as a Solution!

Proud to give back to the community!
Thank You!

6 REPLIES 6
Resident Rockstar

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...

Please give Kudos or Mark as a Solution!

Proud to give back to the community!
Thank You!

Resolver I

Sorry to quick on the reply trigger...

Margin calc'd as follows...

Having difficulties w/ SUM...

Thanks for the continued help....

Resident Rockstar

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!

Please give Kudos or Mark as a Solution!

Proud to give back to the community!
Thank You!

Resolver I

I tried HASONEVALUE (using the last field in the hierarchy) and got the same result.  Any suggestions?

Resident Rockstar

How are you calculating Margin?  I created a mock-up where I'm getting different results?  Try this Measure for Margin instead?

Please give Kudos or Mark as a Solution!

Proud to give back to the community!
Thank You!

Resolver I

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

#### Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

#### Fabric Community Update - September 2024

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

Top Solution Authors
Top Kudoed Authors