Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
shekhar_analyti
Specialist
Specialist

How to change colour in Qliksense based on a condition ?

Hi All ,

How to change the Colour of KPI in Qliksense based on following condition :

1) If    Exp1 > Exp 2  THEN Green

2) If    Exp1 < Exp 2  THEN Red

1) If    Exp1 = Exp 2  THEN Blue

Please attach sample qvf for reference .

Thanks & Regards

Shekar

24 Replies
shekhar_analyti
Specialist
Specialist
Author

Sorry Sunil .. that is not I was looking for what you have attached .

Let me try to explain again ...

EP1 - Measures sale of current day ... should be in green colour if the sale of current day is more than the sale of previous day ... if EP1 is less than sale of previous day it should be in red colour ...........

viveksingh
Creator III
Creator III

Hi,

please find the attached KPI with condition.

here I just put limit value as 200. which means that the color will be red till 200 and it will be green when it is greater than 200.

my value is 510 which is greater than 200. so it will be in green.

like this, you can add more number of limit values. or else you can write your expressions also.

shekhar_analyti
Specialist
Specialist
Author

Thanks for reply , but here in your case you have hardcoded value as limit but as per my scenario I don't know what will be the limit , as it may change on the fly .

Reiterating my scenario :

EP1 - Measures sale of current day ... should be in green colour if the sale of current day is more than the sale of previous day ... if EP1 is less than sale of previous day it should be in red colour ...........

Can you share qvf with expression as limit ?

OmarBenSalem

If your measure 1 = sales for current period

as a limit, put :measure 2 : sales for the previous period

And it will be dynamic

Anonymous
Not applicable

For Current Day Sale You have to turn on the conditional color and in limit section just provide the sale of the last day.

This will compare the sale of current day to last.

and atlast provide color whatever you want.