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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
RichOB
Post Patron
Post Patron

Formatting the colour of matrix totals depending on plus or minus

Hi, I have a matrix table with Category rows and the individual Actuals, Budget, and Vairance measure for the values.

Is there a way to format the totals so the -1800.44 Variance shows up in red as it's a minus?

var2.png

Thanks

 

1 ACCEPTED SOLUTION
sevenhills
Super User
Super User

You can use conditional formatting.

 

sevenhills_0-1742919526320.png

 

sevenhills_1-1742919780482.png

 

Check this video for details: https://www.youtube.com/watch?v=ST9TssrHhCw 

View solution in original post

3 REPLIES 3
pankajnamekar25
Impactful Individual
Impactful Individual

Yes, you can conditionally format the Variance measure in your matrix so that negative values appear in red. Here’s ho

Steps to Apply Conditional Formatting to Variance:

 

1. Select the Matrix Visual in Power BI.

 

 

2. Go to the Format Pane (paint roller icon).

 

 

3. Expand the Values section.

 

 

4. Look for Conditional Formatting and click on the fx button next to Font color (or Background color if preferred).

 

 

5. In the conditional formatting settings:

 

Choose "Rules".

 

Select the Variance measure.

 

Set the rule:

 

If value is less than 0, color = Red

 

If value is greater than or equal to 0, color = Green (or Black, depending on preference).

 

 

 

 

6. Click OK.

 

 

 

Alternative: Using a Custom DAX Measure for Formatting

 

If needed, you can create a separate measure to dynamically determine the color:

 

VarianceColor = 

IF([Variance] < 0, "Red", "Green")

 

Then, apply this measure in the conditional formatting section.

 

This will highlight negative variances in red while keeping positive ones in green (or any other preferred colors). Let me know if you need further clarification!

 

RichOB
Post Patron
Post Patron

That's exactly what I was looking for, thanks very much!

sevenhills
Super User
Super User

You can use conditional formatting.

 

sevenhills_0-1742919526320.png

 

sevenhills_1-1742919780482.png

 

Check this video for details: https://www.youtube.com/watch?v=ST9TssrHhCw 

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors
Top Kudoed Authors