Forum Discussion
Subtotals showing wrong results
Hi Varshi288
This is a well-known behavior in Power BI regarding totals and subtotals.
Unlike what we often expect, Power BI does not aggregate totals by summing up the individual rows ("bottom-up"). Instead, it recalculates the measure in the context of the total row — meaning it uses a different filter context generated by the visual.
So even if [TP CM Scope] is 0 for each individual row (making the percentage 0), at the subtotal level Power BI might be doing:SUM([TP CM Scope]) / SUM([TP_$]),
which can result in a non-zero value.
This is why you're seeing unexpected percentages at subtotal level.
There are different ways to handle this, depending on your logic. Some useful links:
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
Matrix Measure Total Triple Threat Rock & Roll - Microsoft Power BI Community
To help you more precisely, it would be useful to understand your data model and measures.
Please consider sharing:
-
a sample PBIX file or Excel with mock data
-
a screenshot of the expected result (what you want the subtotal to show)
That way we can suggest a more accurate solution.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly