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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Zakaria_1980
Post Patron
Post Patron

Conditional formatting

Dears,

 

i've the following column with some %, and i applied a conditional formating, but the colors are not as the ones i defined in the conditional formating below. can someone help me with this please?

Thanks.

 

Zakaria_1980_0-1634134909171.png

 

Zakaria_1980_1-1634135008975.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Zakaria_1980 ,

Please create a measure as below and set the conditional formatting as below screenshot:

Cond Formatting = 
SWITCH (
    TRUE (),
    [-Planning Accuracy_BVP (BP vs AC)] < 0.5, "Red",
    [-Planning Accuracy_BVP (BP vs AC)] < 0.9, "Orange",
    "Green"
)

yingyinr_0-1634528249679.png

If the above one is not working for your scenario, please share some sample data or your simplified pbix file(exclude sensitive data) in order to provide you a suitable solution. Thank you.

Best Regards

View solution in original post

9 REPLIES 9
PaulDBrown
Community Champion
Community Champion

Try changing the order of the IFs in the conditional cormatting:

First: less the 50%
Second: less than 90%
Third: less than 100%

 

Or

Create a measure to use for the field value in the conditional formatting:

Cond Formatting =
SWITCH([Planning accuracy measure],
< 0.5, "Red",

< 0.9, "Orange",

"Green")





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






even if i changed the order it still the same.

when i created the measure, it gives to me unexpected expression for the "<"

 

Zakaria_1980_0-1634137215590.png

 

Apologies. It should be:

Cond Formatting =
SWITCH ( TRUE() ,
[Planning accuracy measure]< 0.5, "Red",

[Planning accuracy measure]< 0.9, "Orange",

"Green")





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Thanks  alot, where shoud I put this measure please ?

 

In the conditional formatting interface, select Field and add the measure





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






it won't be selected see below snapshot

 

Zakaria_1980_0-1634140688654.png

 

Like this...

Condi Format.png

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






i don't know why it won't pick measures to click on OK.

Anonymous
Not applicable

Hi @Zakaria_1980 ,

Please create a measure as below and set the conditional formatting as below screenshot:

Cond Formatting = 
SWITCH (
    TRUE (),
    [-Planning Accuracy_BVP (BP vs AC)] < 0.5, "Red",
    [-Planning Accuracy_BVP (BP vs AC)] < 0.9, "Orange",
    "Green"
)

yingyinr_0-1634528249679.png

If the above one is not working for your scenario, please share some sample data or your simplified pbix file(exclude sensitive data) in order to provide you a suitable solution. Thank you.

Best Regards

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors