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

View all the Fabric Data Days sessions on demand. View schedule

Reply
nj-matt
Helper I
Helper I

Matrix Conditionally Formatted Above or Below Total

Trying to format so that a given row is higher or lower than the total of the column.

 

Example -->

 

ProductProfit Margin
Candy Bars60%

Potato Chips

50%
Ice Cream35%
Total55%

 

I would like to show a positive format on Candy Bars as higher than 55% PM and the other 2 products as lower than 55%.

 

In the standard options I see only formatting based on a fixed rule or range high to low.

3 REPLIES 3
Anonymous
Not applicable

Hi @nj-matt ,

 

Is the total a row in your table or the subtotal of the visual? Is the Profit Margin a measure or a column? And how the Year influences the Profit Margin? You will need to provided more information if you want DAX formula help.

Check the topic about How-to-Get-Your-Question-Answered-Quickly 

 

Best Regards,

Jay

amitchandak
Super User
Super User

@nj-matt , You can use rule base of color measure

Assuming Profit Margin is a measure

color = Switch(true(),

[Profit Margin] >.55 , "green",

"red"

)

 

use that in conditional formatting with the field value option

Conditional formatting the Pie Visual: https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/...

 

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

Thanks for the quick reply - 

 

Should have clarified - I need this to be dynamic. So for example 55% is the total if they have selected year 2021 but if they choose year 2020 it will be a different total and a different value for each of the products.

 

And yes, profit margin is a measure.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors