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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
jleo25
New Member

Make Totals on a Matrix Red if Negative

In my matrix I have all positive numbers black and all negative numbers red except for the totals. I have months as my column and departments as my lines, I have totals for both month and department. Is there any way to format these just like the rest of the matrix? I just want positive to be black and negative to be red.

 

 

 

1 ACCEPTED SOLUTION

Hi,

 

We don't have conditional format on Totals.

Create another table of same structure with dept and final amount column next to the existing matrix.

Format Dept column to be hidden (may be column width to "2 points") and do conditional format on Final Amount column.

View solution in original post

8 REPLIES 8
martinArias
Regular Visitor

I had this same question then figured it out:

When you apply conditional formatting to the values themselves, you can select apply to Values and Totals in the UI

Conditional formatting.png

Mond
Helper III
Helper III

We don't have conditional formatting for Totals, but I can suggest to use high level table / matrix for the summation and make conditional format on the values.

Hope this help !

Phil_Seamark
Microsoft Employee
Microsoft Employee

Hi @jleo25

 

Yes you can use conditional formatting.  Click the down arrow of the field you would like to apply the conditional formatting to.

 

 

image.png

 

Then choose conditional formatting from the menu and then font colour scales

 

image.png

 

finally configure the conditional formatting dialog for your field as follows

 

image.png

 

Which should give you

 

image.png


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

That is how I got all of the other numbers to look how I wanted but it did not change the totals. Maybe I am missing something? I attached a pic of what I am working with, I have everything looking how I want except the totals.

 

Power BI.png

 

 

 

 

Hi,

 

We don't have conditional format on Totals.

Create another table of same structure with dept and final amount column next to the existing matrix.

Format Dept column to be hidden (may be column width to "2 points") and do conditional format on Final Amount column.

Thank you, that is what I was just trying to figure out after reading your 1st post. Thanks again

Anonymous
Not applicable

Hey @jleo25

 

I don't think it's possible to conditionally format the Total row. Hopefully I'm wrong.

 

Parker

I managed to get something working using a Table visual

 

The total line isn't bold, but will switch from red to black depending on totals.

 

I have attached a PBIX file.

 

 (edit - I have slightly updated the PBIX file to make it tidier)


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

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.