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
Anonymous
Not applicable

Need Help with Conditional Formatting

I have done basic conditional formatting before, but for some reason cannot get this one to work. I have this table (below).

The background color for cells in the Actual/Projected Obs column should be as follows:

Green if greater than 98% or less than or equal  100% of OSD GOAL

Yellow if greater than or equal 92% or less or equal 98% of OSD GOAL

Red if greater than or equal to 0% or less than 92% of OSD GOAL

 

So, the correct background colors should be:

Red

Red

Green

Yellow

Green

Green

Green

Green

Green

Green

Green

Green

 and I get something completely different. Maybe because it is using SUM? But I don't see any other option. Please help!

I guess it is worth noting that I am on Version: 2.72.5556.701 32-bit (August 2019) of Power BI.

ColorCoding1.JPG

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Create a color measure and use that in conditional formatting with field value option

Switch(true(),
[OSD GOAL] >=.98 , "green", // use 98 if this not a % column
[OSD GOAL] >=.92 , "yellow",// use 92 if this not a % column
[OSD GOAL] >=0 , "red"
)

 

 

refer video or links for steps

https://www.youtube.com/watch?v=RqBb5eBf_I4

 

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

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

View solution in original post

5 REPLIES 5
numansaeed
Regular Visitor

I have a table into a report with applied conditional formatting
There is few field with project dosuments count and we want to apply conditional formatting based on numbers count like if documents is > 0 then icon Green and if documents count is <= 0 then Red icon but additionally we want to add one more condition that where "Specific" project documents count is 0 or more than 0 but in any case "specific" project icon should be Green.

amitchandak
Super User
Super User

@Anonymous , Create a color measure and use that in conditional formatting with field value option

Switch(true(),
[OSD GOAL] >=.98 , "green", // use 98 if this not a % column
[OSD GOAL] >=.92 , "yellow",// use 92 if this not a % column
[OSD GOAL] >=0 , "red"
)

 

 

refer video or links for steps

https://www.youtube.com/watch?v=RqBb5eBf_I4

 

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

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
Anonymous
Not applicable

@amitchandak  In your example you are just using [OSD GOAL], my measure would not allow me to use it like that. However, it allowed to use MAX. Could that be the problem?

Hi @Anonymous 

 

In your data, all values from the [OSD GOAL] column are greater than .98 (the smallest one in image is 48039), so all the fields are green. This is a correct behavior. You need to put a measure whose result is percentage values between 0 and 1 to make this color measure work as you expected.

 

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

Anonymous
Not applicable

@amitchandak , thank you very much for your reply! I watched the video and created the measure. However, now all the fileds are green. What am I doing wrong?

ColorCoding1.JPG

Helpful resources

Announcements
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.

Top Kudoed Authors