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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
selected_
Helper IV
Helper IV

Conditional formating not working in Power BI

I have a condition on a measure that I calcualted a percentage of "women" in the gender column, and in the conditional formating I have the measure as a Rules in the Format Style I tell it will show green whenever its between 40% and 60% otherwise it will show red, but I don't get why 40% still is red and 62% as green, what's going on ?

 

selected__0-1694502614951.png

 

 

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @selected_ 

 

You can try the following methods.
Sample data:

vzhangti_0-1695108943148.png

Color Measure = IF([Percentage]>=0.4&&[Percentage]<=0.6,"Green","Red")

vzhangti_1-1695109029640.pngvzhangti_2-1695109044339.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
mussaenda
Super User
Super User

Hi @selected_ ,

 

make you selection as number instead of percentage. then use decimal instead of percentage value

v-zhangti
Community Support
Community Support

Hi, @selected_ 

 

You can try the following methods.
Sample data:

vzhangti_0-1695108943148.png

Color Measure = IF([Percentage]>=0.4&&[Percentage]<=0.6,"Green","Red")

vzhangti_1-1695109029640.pngvzhangti_2-1695109044339.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

selected_
Helper IV
Helper IV

Unfortunately none of your examples works.

Tahreem24
Super User
Super User

@selected_ My Perc column is in 0.0 to 1 format and I made it as Percetage from Format option.

Tahreem24_0-1694504817846.png

 

Tahreem24_1-1694504860549.png

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
Idrissshatila
Super User
Super User

Hello @selected_ ,

 

do it like this in the image as 0.4 and 0.6 and make it number

Idrissshatila_0-1694504665511.png

this image was taken from this blog, check it out https://hevodata.com/learn/power-bi-conditional-formatting/

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin
Vote For my Idea💡

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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