Forum Discussion
KPI with 5 color ranges
I have a KPI that is centered around 1 and needs to display these colors depending on the value:
< 0.7 = red
0.7 - 0.9 = yellow
0.9 - 1.2 = green
1.2 - 1.5 = yellow
>1.5 = red
With the KPI visual I can include 2 target to get 3 ranges. Can I extend this somehow to get all 5 color ranges?
Hi Anonymous ,
Don't know if you need to have the trend values that appear on the KPI visualization but if you only interested in the number and giving it the colours you can create a measure for condittional formatting the value in a card visualization:
Condittional Formatting = SWITCH ( TRUE (), [Measure] < 0.7, "red", [Measure] >= 0.7 && [Measure] < 0.9, "yellow", [Measure] >= 0.9 && [Measure] < 1.2, "green", [Measure] >= 1.2 && [Measure] < 1.5, "yellow", [Measure] > 1.5, "red" )No use this measure to format the card value:
3 Replies
- MFelix
Super User
Hi Anonymous ,
Don't know if you need to have the trend values that appear on the KPI visualization but if you only interested in the number and giving it the colours you can create a measure for condittional formatting the value in a card visualization:
Condittional Formatting = SWITCH ( TRUE (), [Measure] < 0.7, "red", [Measure] >= 0.7 && [Measure] < 0.9, "yellow", [Measure] >= 0.9 && [Measure] < 1.2, "green", [Measure] >= 1.2 && [Measure] < 1.5, "yellow", [Measure] > 1.5, "red" )No use this measure to format the card value:
- AnonymousNot applicable
Thank you! This is what I needed.
- AnonymousNot applicable
Hi Anonymous,
I think MFelix 's formula should help for your sceniaro.
BTW, it will be helpful if you share some dummy data with raw table structure and the KPI expression which you used to test.
Regards,
Xiaoxin Sheng