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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
sonalisaha2310
Helper II
Helper II

Conditional Formatting - I want to color the total in red even if the value is not zero

I have matrix visual , to get the colour of the total as red, if the values inside it it 0

 

for example

- A1084212
    -  AA54216
             AAA52110
             AAAA02106
    +BB54216

 

Consider the above matrix visual , i want to highlight the total in red as well if the value inside it is 0 as shown in an example of AA

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @sonalisaha2310 ,
Thanks to @Joe_Barry reply.
Based on your description, you want to include subtotals for columns with a value of 0 for custom formatting. However, the current power bi desktop only supports custom formatting for value fields. So, you can try to set an identifier for the subtotal to highlight. Here is the sample data and measure

vheqmsft_0-1721972908865.png

Create measure

Color.1 = 
IF(
    ISINSCOPE('Table'[Second Level]) && SELECTEDVALUE('Table'[Value.1]) = 0 ,
    "Red"
)

Create measure for each column
Final output

vheqmsft_1-1721973073921.png

 

Best regards,
Albert He

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

 

View solution in original post

2 REPLIES 2
Joe_Barry
Super User
Super User

Hi @sonalisaha2310 

 

Please add + 0 to the measure that you are using in the visual, if you are just adding a column from a table to calculate, then please create a measure. The +0 will help show data if the resultof the measure is BLANK().

In the conditional formatting of the visual in cell elements, there is an option to put the conditional formatting on both Values and Totals, please activate this and you should get the result you need.

 

Joe




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

Proud to be a Super User!





Learn about the Star Schema, it will solve many issues in Power BI!

Date tables help! Learn more



LinkedIn
Let's connect on LinkedIn


Anonymous
Not applicable

Hi @sonalisaha2310 ,
Thanks to @Joe_Barry reply.
Based on your description, you want to include subtotals for columns with a value of 0 for custom formatting. However, the current power bi desktop only supports custom formatting for value fields. So, you can try to set an identifier for the subtotal to highlight. Here is the sample data and measure

vheqmsft_0-1721972908865.png

Create measure

Color.1 = 
IF(
    ISINSCOPE('Table'[Second Level]) && SELECTEDVALUE('Table'[Value.1]) = 0 ,
    "Red"
)

Create measure for each column
Final output

vheqmsft_1-1721973073921.png

 

Best regards,
Albert He

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

 

Helpful resources

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

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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