Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
PineLeaf
Frequent Visitor

Power BI Matrix Group Sub Total Row Gets Values From Source Data

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

 

PineLeaf_0-1667802532912.png

 

 

 

Raw Data looks like this

PineLeaf_1-1667802532914.png

 

3 REPLIES 3
ImkeF
Community Champion
Community Champion

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

PineLeaf
Frequent Visitor

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?

ImkeF
Community Champion
Community Champion

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors