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...
speedramps
6 years agoSuper User
Hi adhumal
Please conisder this solution
Create this measure and drag and drop it to your visual.
the UNICHAR will create the icon for you.
Myicon =
VAR Myvalue = -4 -- substitute this hard code value with you measure and multiply with 100 if a %
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()
)
adhumal2
6 years agoHelper III
speedrampsI tweaked the formula, but it still gives me the same result. Sorry but I am quite new to this
Here is the DAX that i used
Myicon2 =
VAR MYVALUE = [Difference %] * 100
RETURN
SWITCH(TRUE(),
MYVALUE < -100, BLANK(),
MYVALUE <= -5, UNICHAR(128994),
MYVALUE <= -0, UNICHAR(128993),
MYVALUE <= 100, UNICHAR(128308),
BLANK()
)