cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors