Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I am using the Power BI Matrix control as I like the expand/collapse and how subtotals displayed when collapsed.
My “source data” already contains rows which could be looked up to retrieve the correct subtotal values.
When a row is looked up there are about 50 columns I would to retrieve and display on the subtotal row.
I do not want to recalculate the values in Power BI (some of them are quite complex).
Can the Matrix “group row” – get its subtotals from correct “data row”.
For Example: if UI group level = “Filter Level 2” and get current value equals “defensive” get data row where filter level 2 = “defensive” and “filter level 3” is blank?
Or If UI Group Level = “Filter Level 3” and current value equals “Australian Fixed Income” get data row where filter level 3 = “Australian fixed income” and “level 4 is blank”
Can the formula pass the column name in as the column names are identical across the group total and data row - ie so 50 measures do not need to be created.
Alternatively
Can the row with the correct subtotal data be promoted as the sub-total row?
Example Below:
The correct value for “Defensive” should be -0.01% not -0.02% and can be seen in the data below.
The correct value for “Aus Fixed Income” should be 0.00% not -0.01%
Matrix Report at the moment – shows totals on a separate line and does not show sub-totals when collapsed
Raw Data looks like this
Hi @PineLeaf ,
there is a good chance that calculation groups can do this: Creating Calculation Groups in Power BI Desktop - SQLBI
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hey thanks - that video references creating new measures to do it (ie 50 measures). Is there a way to make such logic work on a row level rather than per column?
Hi @PineLeaf ,
yes, that's possible using the ISINSCOPE function.
Check out this video on how to apply: How to Choose a Different Aggregation (than SubGroup) in Subtotals | Power BI - YouTube
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!