Forum Discussion
Force Matrix Table Subtotal at level 1
- 11 months ago
Hi NelsonPay,
Thank you for reaching out to the Microsoft fabric community forum.I’ve reproduced your scenario in Power BI Desktop using sample data with Product → Country hierarchy and the Oversell >125% column. Initially, I observed the same issue you described. the Product-level subtotal was showing 0 even though some Countries had positive values.
To resolve this, you need to adjust the DAX measure so that the “positive check” happens at the Country level, and then these results roll up correctly to the Product subtotal.
Here’s the corrected measure:
Total Positives = SUMX ( VALUES ( 'Total Sells'[Country] ), VAR total_positives = CALCULATE ( SUM ( 'Total Sells'[Oversell >125%] ) ) RETURN IF ( total_positives > 0, total_positives, 0 ) )For your reference, I’ve attached a sample .pbix file.
Best regards,
Ganesh Singamshetty.
Hello NelsonPay,
Hope everything’s going great with you. Just checking in has the issue been resolved or are you still running into problems? Sharing an update can really help others facing the same thing.
Thank you.