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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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

 










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


Proud to be a Super User!









"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

3 REPLIES 3
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! 

v-yilong-msft
Community Support
Community Support

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

 










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


Proud to be a Super User!









"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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.