cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Madhura29
Frequent Visitor

Conditional Formatting of Measures in Slicers

Hello Everyone !

 

Please help me solve the following doubt - 

I have few measures which are selected through Slicer. Is there any way where I can do a conditional formatting of Values ?

For Example if I have a measure - 1. Average, then the formatting should be Values below -1 - Red , Values 0 - Orange, Values above 1 - Green 

and second measure 2. Percentage - below 9% - Red 10% - Orange Above 11% should be Green. 

 

Thank you. 

 

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @Madhura29 ,

 

I did a test, the reference is as follows:

colour = 
var col = SELECTEDVALUE('Table'[Avg])
return
SWITCH(
    true(),
    col >0 ,"green",
    col = 0,"orange",
    col <0 ,"red")

vhenrykmstf_0-1624607203896.png

vhenrykmstf_1-1624607224736.png

 


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.

Best Regards,
Henry

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

amitchandak
Super User
Super User

@Madhura29 , You have create a color measure like this measure

 

Assume you measure is value
Switch(selectedvalue(slicer[measure]),
"Average", Switch( True(), [Value] =1 , "Red", "Green") ,
"Percentage ", Switch( True(), [Value] <=.9 , "Red",[Value] <=.1 , "Orange", "Green")
)

 

 

and use that in conditional formatting using field value option

How to do conditional formatting by measure and apply it on pie?: https://youtu.be/RqBb5eBf_I4

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

Helpful resources

Announcements
Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and more.

Power BI Womens Summit 2021 768 x460.jpg

Interviews, learning sessions, allies, and more!

#PowerBIWomenSummit

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!