Forum Discussion
Custom Matrix Subtotals
Hi All!
I have matrix with 3 different row items, that all rollup into the cateogry "volume". This matrix has columns that groups the start of month for the last 12 months. This is a snapshot of what my matrix looks like:
When collapsed:
The issue is that these volumes are in different units so the sum shows A + B + C, whereas I really want it to show A + (B/2) + (C/4). I also need to keep each of the volumes as their respective raw numbers outside of the total calculation.
I was curious on what's the best / cleanest way to show this. I'm realtively new to PBIX, so not sure what the best approach is:
- Is there a way to change Power BIs built-in functionality for that subtotal so that I can alter the way its being calculated?
- Should I remove the subtotal calculation and create a measure with my formula above?
- Not sure even how to remove the row level total - it seems that every resource I view uses the old Visualizations pane and by turning off "each row subtotal" option, which I can't even find in the newer layout.
- I have other matrices (of the same layout) on the report that show different groupings (revenue, expense) so I want to keep the look and feel of each of them consistent with one another.
Hopefully this describes the issue I'm facing and any help / throughts would be much appreciated!
1 Reply
- parry2kSuper User
fetterr the only way is to write your own measure for the subtotals, something like this, and use this measure in the matrix visual
My Measure = IF ( HASONEVALUE ( Table[RollupCategory] ), <<your Regular measure>>, <<your subtotal calculation logic measure>> )👉 Learn Power BI and Fabric - subscribe to our YT channel - @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤️