Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Gabe_V
Helper I
Helper I

Percentages in Category calculates incorrectly, but percentages in Total column calculate correctly

I have a matrix in Power BI that looks like the following:

Gabe_V_1-1728586881668.png

 

I have a DAX measure that calculates Percentage of Active for each column as follows:

 

 

Percentage of Active = DIVIDE(
    COUNT('Project Status Report'[Project ID]),
    CALCULATE(COUNT('Project Status Report'[Project ID]), FILTER(ALLSELECTED('Project Status Report'),'Project Status Report'[Project Status]="Active")
    ))

 

 

My problem is that although the Percentage of Active calculates correctly for the Total column, it doesn't calculate properly for any of the other columns. For example: For the "Green" row, 7 in Total Combined Column divided by 11 in the Total row in the Total Active Column, converted to % provides the correct value of 63.64%. However, for the same "Green" row in the Control Center Column, a 6 in the Control Center Combined Column divided by 10 in the Total Row of the Control Center Active column, converted into a %, results in an incorrect value of 54.55% when it should have been 60%.

Does anyone have any idea how to fix this?

Considering I really care most for the Total column, if there is a way to hide "Percentage of Active" in all columns except the Total column in the matrix, that would be even better.

Any help is greatly appreciated, thank you! 

1 ACCEPTED SOLUTION

Thank you @lbendlin, I'll use that as a stop-gap. I think because this isn't dynamic as a backup I'll need help with my DAX to at least make those columns show correct data, on the off chance that I have to revert back to showing them.

View solution in original post

4 REPLIES 4
v-yaningy-msft
Community Support
Community Support

Hi, @Gabe_V 

Thanks for lbendlin's reply. Obviously, this problem results because of 6/11, not 6/10, and you can provide pbix files without sensitive data for testing. Unfortunately, the current version of PBI desktop's matrix does not support displaying only the Total Combind columns.

Best Regards,
Yang

Community Support Team




Thank you for that clarification, @v-yaningy-msft . I wasn't able to figure out how to get it to divide by the individual column total as opposed to the grand total.

lbendlin
Super User
Super User

Disable word wrap for the column headers

Disable auto sizing for the column headers

Disable word wrap for the values

Size the undesired columns so small that they kinda sorta disapperar.

 

Note: This is not dynamic. New column values will bleed through.

Thank you @lbendlin, I'll use that as a stop-gap. I think because this isn't dynamic as a backup I'll need help with my DAX to at least make those columns show correct data, on the off chance that I have to revert back to showing them.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.