Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
I have the following SWITCH coded in DAX where "Score" comes from a VAR that's based on slicers. The below is working as intended.
SWITCH(
TRUE(),
Score <= 0.5, 1 ,
Score <= 0.8, 2 ,
Score <= 1.1, 3 ,
Score <= 1.4, 4 ,
Score <= 1.7, 5 ,
Score <= 2.0, 6 ,
7
)
I'd like to conditionally format the output [ = 1 or 2 or 3 or 4. . .) with the following colors, but the code below doesn't work.
Any ideas on how to correct?
SWITCH(
TRUE(),
Score <= 0.5, 1 && "#207ECC" ,
Score <= 0.8, 2 && "#82BAE8" ,
Score <= 1.1, 3 && "#BBDBF4" ,
Score <= 1.4, 4 && "#FFFFFF" ,
Score <= 1.7, 5 && "#FFBEA8" ,
Score <= 2.0, 6 && "#FF8913" ,
7 && "#FF4B13"
)
Thanks!
Solved! Go to Solution.
@mrothschild , Prefebally a measure assuming score is a measure
Color = SWITCH(
TRUE(),
Score <= 0.5, "#207ECC" ,
Score <= 0.8, "#82BAE8" ,
Score <= 1.1, "#BBDBF4" ,
Score <= 1.4, "#FFFFFF" ,
Score <= 1.7, "#FFBEA8" ,
Score <= 2.0, "#FF8913" ,
"#FF4B13"
)
Use this in conditional formatting with "Field value" option
@mrothschild , Prefebally a measure assuming score is a measure
Color = SWITCH(
TRUE(),
Score <= 0.5, "#207ECC" ,
Score <= 0.8, "#82BAE8" ,
Score <= 1.1, "#BBDBF4" ,
Score <= 1.4, "#FFFFFF" ,
Score <= 1.7, "#FFBEA8" ,
Score <= 2.0, "#FF8913" ,
"#FF4B13"
)
Use this in conditional formatting with "Field value" option
Thanks!
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
117 | |
101 | |
71 | |
61 |