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
PetrM
Frequent Visitor

Conditionally format Total row in a Matrix visual

I have a Matrix visual with values conditionally formatted based on row header categoris (green, yellow and red categories -> accordingly colored rows). The following measure does the job:
Color Measure =
switch ( FIRSTNONBLANK(DimColors[Color],"NA"),
    "red","#fa4755",
    "yellow", "#a38600",
    "green", "#20bd20",
    "#bcbcbc"
)
 
This works well, except for the total row, which turns out green. How do I take control over the Total row color?
Any help would be much appreciated.
4 REPLIES 4
KeyurPatel14
Responsive Resident
Responsive Resident

Hi @PetrM ,
Hope you are doing well.
If I understand your requirement correctly then I think you can use ISFILTERED() DAX Formula to get control over the Total row color. You can use ISFILTERED() function inside IF() function with the color measure you have.
If you have any queries then please let me know or you can also share your pbix file so that I can help you.
If this give you any idea or helps you in your problem then give it a kudos and please accept it as a solution.
Thank you.

Thank you @KeyurPatel14 - I was playing with the ISFILTERED() since that is what ChatGPT also recommended. But I was unable to make it work.

Here is a picture and a pbix example.

PetrM_0-1679155556627.png

 

Access was required to download the file so I have sent the request kindly accept it so that I can download the pbix.
Thank you.

I'm sorry, I believed I created a public link. It should be ok now. Thank you for not giving up.

Helpful resources

Announcements
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.