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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
ahhollan
Helper I
Helper I

Conditional formatting complex situation comparing two percentages

I need to conditionally format a column based on the following rules. (also see screenshot below)

If Actual to Target is greater than EE Target % , it is red (employee has charged more to default than target). If Actual to Target is less than EE Target %, it is green (employee has charged less to default than target). If Actual to Target is 100% and the EE Target is 100%, it is green (employee has charged 100% to default which is expected-there are not many of these). If Actual to Target is 100% and the EE Target is less than 100%, it is red (employee has charged 100% to default and their target % is less than 100%).

 

Below is the screenshot with conditional formatting partially working. 

ahhollan_0-1681216357681.png

Below are my rules. I can't quite get them right. Thanks in advance for the help.

ahhollan_1-1681216421506.png

 

1 REPLY 1
amitchandak
Super User
Super User

@ahhollan , Create a color measure

 

example

 

if([M1] > [M2], "Green", "Red")

 

or

 

Switch( True() ,
[Percent] =1 , "Green"
[percent] <.75 , "red",
[percent] <.99 , "Yellow"
)

 

Measure =
Switch(true(),
max(Table[status]) = "In production" , Switch(true(),
[SLA] = 1 , "Green" ,
[SLA] >= .5 , "Amber" ,
"Red "
) ,
max(Table[status]) = " Product completed" , Switch(true(),
[SLA] = 1 , "Green" ,
[SLA] >= .5 , "Amber" ,
"Red "
)
)

 

 

Use that is conditional formatting using the field value option

 

How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/...
https://amitchandak.medium.com/power-bi-where-is-the-conditional-formatting-option-in-new-format-pan...

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

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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