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

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.

Reply
AliPoTD
Advocate II
Advocate II

How to colour sub-total rows of a matrix visual without affecting the entire column

Hello,

 

I suspect this has a straightforward answer but I'm going round in circles! Hopefully someone can help.

 

I have a matrix table and am using row sub-totals.

I only want one of the rows to have a sub-total and am getting this to show as desired.

The issue I have is using a background colour to show the sub-total row.

If I opt to have a background colour, it hightlights all the columns as well, which I don't want. 

I only want the sub-total row to be highlighted in a different colour; how can I achieve this please?

 

For example:

Turning on the sub-total row for the column without applying to labels shows this (ignore grey boxes, used to hide personal data):

AliPoTD_0-1740650988908.png

But I want the green background to extend to show from the word "Total". If I select "Apply to labels", i get this:

AliPoTD_1-1740651218979.png

I don't want the entire columns to be green, only the sub-total row.

How can I achieve this please?

 

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @AliPoTD 

 

You can  write a measure to conditionally format just the subtotals. Example:

conditional formatting color =
IF (
    NOT ( inscope ( table[column in the lowest level of the hierarchy] ) ),
    "color"
)

Replace color with RGB, RGBA, HEX or basic colors like green or red. Choose field value from the conditional formatting option and select this measure.

 

Please note that conditional formatting applies to values section of the matrix only and does not extend to the row or column categories. Othere than this, there is no other way to color just the subtotals.

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

2 REPLIES 2
danextian
Super User
Super User

Hi @AliPoTD 

 

You can  write a measure to conditionally format just the subtotals. Example:

conditional formatting color =
IF (
    NOT ( inscope ( table[column in the lowest level of the hierarchy] ) ),
    "color"
)

Replace color with RGB, RGBA, HEX or basic colors like green or red. Choose field value from the conditional formatting option and select this measure.

 

Please note that conditional formatting applies to values section of the matrix only and does not extend to the row or column categories. Othere than this, there is no other way to color just the subtotals.

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Many thanks for getting back to me. Understood. Unfortunately my issue does not relate to the Value but to the Row data, so I can't use conditional formatting.

Ah well, I've learned something new at least!

Thanks for your help.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.