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

Can you do for a KPI object and share the qvf . It will be really helpful .

Anil_Babu_Samineni

In your data, 30-3-2014 is the Max Date. Can you tell us which logic you want to build here. What was the Expr1 and Expr2 in your original posting

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
shekhar_analyti
Specialist
Specialist
Author

Hi Anil

Please find corrected excel . Also use data of tab named data , the one having less data .

Expression one - Sales on current Day

Expression two - Sales on previous day

if EXP1 > EXP2 Then show down arrow else up arrow with green colour

shekhar_analyti
Specialist
Specialist
Author

correction

if EXP1 < EXP2 Then show down arrow else up arrow with green colour

Anil_Babu_Samineni

Check the App, look the 2nd Sheet

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
shekhar_analyti
Specialist
Specialist
Author

Hi Anil ,

Thanks for reply but I was looking for something like this .

KPI WITH CONDITIONAL COLOUR.JPG

Using this object of qliksense .

KPI IN QS.JPG

Anil_Babu_Samineni

Hi Shekhar, This is simple and we can achieve with default ASCII Codes. This case you can Bundle load to get it if you need or simple use Chr() function with ASCII Number

Capture.PNGCapture.PNG

I used this expression for Prev Day

If(Num(Sum({<Datee = {'$(=Max(Datee))'}>}SALES))<Num(Sum({<Datee = {'20/03/2020'}>}SALES)),

Num(Sum({<Datee = {'$(=Max(Datee))'}>}SALES))& Chr(9661), Num(Sum({<Datee = {'20/03/2020'}>}SALES)) & Chr(9650))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
shekhar_analyti
Specialist
Specialist
Author

Cool .. Please attach qvf !

Anil_Babu_Samineni

Here you go

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
shekhar_analyti
Specialist
Specialist
Author

Can you please attach sample qvf ?