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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. 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
Community Champion
Community Champion

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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors