Forum Discussion
adhumal2
6 years agoHelper III
Conditional Formatting for negative values with 3 conditions
Hi Experts, I want to do the conditional formatting of negative values as mentioned below. How can I achieve it with icons. also , please please let me know how to work with numbers or percen...
adhumal2
6 years agoHelper III
speedramps Thank you. I added the measure provided by you but it only gives me the 'red' icons only. Below is the screenshot
Here is the DAX
MyICON =
VAR MYVALUE = [Difference %]
RETURN
SWITCH(TRUE(),
MYVALUE<-100,BLANK(),
Myvalue <= -5, UNICHAR(128994), -- green if > -100 and <= -5
Myvalue <= -0, UNICHAR(128993), -- yellow if > -5 and <= 0
Myvalue <= 100 , UNICHAR(128308), -- red if >0 and <=100
BLANK()
)
nandukrishnavs
6 years agoCommunity Champion
Try this
MyICON =
VAR MYVALUE = [Difference %]
VAR RESULT =
IF (
MYVALUE > -1
&& MYVALUE <= -0.05,
UNICHAR ( 128994 ),
IF (
MYVALUE > -0.05
&& MYVALUE <= 0,
UNICHAR ( 128993 ),
IF (
MYVALUE > 0
&& MYVALUE <= 100,
UNICHAR ( 128308 ),
BLANK ()
)
)
)
RETURN
RESULT
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
- adhumal26 years agoHelper III
Thanks for your reply. I used your formula but its showing me below results still (only red icons appear)
- nandukrishnavs6 years agoCommunity Champion
Follow this.
Create a DAX measure for an icon.
Icon = UNICHAR(11044)Use this measure in your table visual.
Create another measure for conditional formatting.
Color = VAR MYVALUE = [Difference %] VAR RESULT = IF ( MYVALUE > -1 && MYVALUE <= -0.05, "green", IF ( MYVALUE > -0.05 && MYVALUE <= 0, "orange", IF ( MYVALUE > 0 && MYVALUE <= 100, "red", BLANK () ) ) ) RETURN RESULTThen format the Icon (Font) measure field using the newly created "Color" measure.
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂- adhumal26 years agoHelper III
nandukrishnavs- Superb, That worked perfectly. Many Thanks.