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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dekidroske
New Member

Erratic displays of icons with conditional formatting

I am using a red/green icon with conditional formatting.  Everything under 50.9999% should be green, everything above should be red.  However, when I apply the conditions I get a mix of icon colors (red/green) not aligned to the conditional criteria.  Why?

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@dekidroske , when say %, You use Number( Not percent ) in the option and use .5 for 50% if that is % column

 

You can also create measure and use field value option

 

example

Switch(true(),
[SLA] = 1 , "Green" ,
[SLA] >= .5 , "Amber" ,
"Red "
)

 

How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/...

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

HI @dekidroske,

Does any aggregation apply to your value fields? If that is the case, the condition formatting is to check the detailed records instead of aggregated values.
I think you need to use a measure with to calculate the aggregate values and use it to apply conditional formatting.

Conditional table formatting in Power BI Desktop - Power BI | Microsoft Docs

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
amitchandak
Super User
Super User

@dekidroske , when say %, You use Number( Not percent ) in the option and use .5 for 50% if that is % column

 

You can also create measure and use field value option

 

example

Switch(true(),
[SLA] = 1 , "Green" ,
[SLA] >= .5 , "Amber" ,
"Red "
)

 

How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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