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

Conditional formatting Grand total in a matrix

I am looking at changing color for the total field in a matrix table, the total field is a Column subtotal done in power bi formating.

I want to be able to change the color depending on the line results.

Capture.JPG

so basically if the first total is less than 100 then red if more then green, second total if less then 3 then green else red and so goes on.

4 REPLIES 4
amitchandak
Super User
Super User

You have to create a measure using allexcept that has the row total. Let assume row is view by region then

 

measure = calculate(sum(sales[sales])allexcept(Region[Region]))

 

The create a color measure on top of it

color = if(measure>=100, "green","red")

You can add more condition

 

Now in the format you have conditional formatting or background. When you hover you will see three dots or on the selection field, you will get conditional formatting. Open that and use the field option and choose the color measure.

 

You have to do this for all columns.

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak , 

 

I am trying to apply your solution but I can't seem to figure out the second part where you talked about "Now in the format you have conditional formatting or background. When you hover you will see three dots or on the selection field, you will get conditional formatting. Open that and use the field option and choose the color measure.". 

 

Would you be able to insert a couple of screenshots here. i dont see the option to use the colour mesure as part of the conditional formatting, etc..

 

TIA

MFelix
Super User
Super User

Hi @rafajammali ,

 

Currently conditional formatting is not available for total or subtotals in the matrix/table visualizations. 

 

Is on the backlog of the development team. check the post below:

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/17401381-conditional-formatting-f...


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.