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.
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!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |