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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.