Forum Discussion
Subtotals showing wrong results
Hi All,
I have a measure which is showing wrong results for one item at in subtotals when I drill dow to order level it showing correctly.
the TP$ value should be 0 for trading but there are some values after the decimal. How to solve this.
thanks
Hi Ritaf1983 ,
I got the solution for subtotals whith the above links but not able to slove the issue after the decimal point. It should be zero.
4 Replies
- Ritaf1983
Super User
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
-
- AnonymousNot applicable
Hi Varshi288,
Thank you for reaching out to the Microsoft Fabric Forum Community, and special thanks to Ritaf1983 for prompt and helpful response.
Just following up to see if the response provided by community member were helpful in addressing the issue.
If one of the responses helped resolve your query, please consider marking it as the Accepted Solution. Feel free to reach out if you need any further clarification or assistance.
Best regards,
Prasanna Kumar