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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
astartes6
New Member

Help with Row Subtotal Background Color

Hello, 

I am having an issue setting the background color for subtotal rows in a Matrix similiar to the one below: *Using proxy values as the actual data is work sensitive*

astartes6_2-1735944961341.png

 

Using the Subtotal row tools this is what I have managed to get to but I want only the Army Total, Type Total, and Description Total rows to be highlighted so that the table looks like this:

astartes6_1-1735944926855.png

Row Subtotal and Matrix settings. Subtotal Labels set to [Show subtotal] and Subtotal label for the appropriate row/columns.

astartes6_4-1735945117737.png

Any help would be appreciated!

 

 

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @astartes6 

 

You can use conditional formatting but please  take note that conditional formatting can be applied to values only  - not row or column categories.  In the screenshot below, I am applying a yellow color fill to the Apparel and Homegoods category rows using conditional formatting. Please note that the colors are not applied to the categories and if there are blank values, they won't be applied to the cells with blank values as well.

Selective Conditional Formatting = 
VAR __SelectedCategory =
    SELECTEDVALUE ( Category[Category] )
RETURN
    IF ( __SelectedCategory IN { "Apparel", "Homegoods" }, "yellow" )

 

 

danextian_0-1735964236515.png

 





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

4 REPLIES 4
Luna2023
Regular Visitor

Hello. I met the same issue now. Have you fixed it? Could you please share the mehod you used to fix? Thanks a lot!

astartes6
New Member

Thank you both for looking at this. It looks like a combonation of Selective Conditional Formating and the standard highlighting might work! 

Anonymous
Not applicable

Hi @astartes6 ,

First of all I couldn't agree more with danextian, again I have some of my own opinions.

I create a table and make it into the matrix.

vyilongmsft_0-1736130015452.png

vyilongmsft_0-1736151724814.png

Then I think you can color what you want.

vyilongmsft_1-1736152173736.png

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

danextian
Super User
Super User

Hi @astartes6 

 

You can use conditional formatting but please  take note that conditional formatting can be applied to values only  - not row or column categories.  In the screenshot below, I am applying a yellow color fill to the Apparel and Homegoods category rows using conditional formatting. Please note that the colors are not applied to the categories and if there are blank values, they won't be applied to the cells with blank values as well.

Selective Conditional Formatting = 
VAR __SelectedCategory =
    SELECTEDVALUE ( Category[Category] )
RETURN
    IF ( __SelectedCategory IN { "Apparel", "Homegoods" }, "yellow" )

 

 

danextian_0-1735964236515.png

 





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.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors