Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

ext_bay
New Contributor III

Set KPI limit that changes color based on comparison

Hi all,

So I have a KPI like the one below:

Here the largest value is my CYTD Sales and the smaller value is the LYTD Sales. Now I want to set a limit and set colors as follows:

-- If CYTD is larger then LYTD it should be green and LYTD should be red

- If LYTD is larger that CYTD it should be green and CYTD should be red

I can't use rgb codes combined with an if statement in this case so I am wondering how to set the limit..

Thanks in advance!

1 Solution

Accepted Solutions
ext_bay
New Contributor III

Re: Set KPI limit that changes color based on comparison

Never mind I figured it out. The limit is just the expression that I want to compare with. So in case of CYTD the limit is the expression for LYTD

3 Replies
ext_bay
New Contributor III

Re: Set KPI limit that changes color based on comparison

And the Limit is dynamic, based on the user date selection

ext_bay
New Contributor III

Re: Set KPI limit that changes color based on comparison

Never mind I figured it out. The limit is just the expression that I want to compare with. So in case of CYTD the limit is the expression for LYTD

OmarBenSalem
Esteemed Contributor

Re: Set KPI limit that changes color based on comparison

ur KPi have 2 expressions:

expression1

expression2

now, go to colors:

for the first expression1:

add limit: expression2:

Capture.PNG

and visversa :

Capture.PNG

Community Browser