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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

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
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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