Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
kdaniels-obrien
Partner - Creator
Partner - Creator

Using an expression and color conditions on KPI

Hi, 

I am trying to use conditional coloring to change the color of a KPI based on some thresholds I have set as variables. For example, if the value is less than 5, show green. If it's less than 10, show yellow and if its greater than 10, show red.  I've tried adding the three colored limits and setting expressions like this:

My variables: GreenThreshold = 5, YellowThreshold = 10, RedThreshold= 15

Green: if(MyMeasure < GreenThreshold, MyMeasure,0)

Yellow: if(MyMeasure < YellowThreshold, MyMeasure,0)

Red:  if(MyMeasure > RedThreshold,My Measure)

 

I know my if statements are wrong but I can't think of another way to solve the problem. Could someone with more experience help me? lol

Labels (7)
1 Solution

Accepted Solutions
TimvB
Creator II
Creator II

You could use the Simple KPI object from the Qlik visualization bundle. You can add conditional limits for every measure and set the color including an icon when the measure is over or under a certain limit. There are no if statements needed.

 

9604F3E2-8E2C-4B2D-BD4A-0AC74200C932.png

 

Hope it helps!

 

View solution in original post

1 Reply
TimvB
Creator II
Creator II

You could use the Simple KPI object from the Qlik visualization bundle. You can add conditional limits for every measure and set the color including an icon when the measure is over or under a certain limit. There are no if statements needed.

 

9604F3E2-8E2C-4B2D-BD4A-0AC74200C932.png

 

Hope it helps!