Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
JoseGarcia
Creator III
Creator III

Colour expression

Hi, 
Could anyone help with  this colour expression?
Cannot figure-out the error.
Thanks a million!

if(EightD.Kx_Classification='K1S' and Date(EightD.D1_KPIDate+15) > today(),
RGB(220,50,35),
RGB(50,70,30)
,
if(EightD.Kx_Classification<>'K1S' and Date(EightD.D1_KPIDate+30) > today(),
RGB(220,50,35),
RGB(50,70,30)
)
)

Labels (1)
1 Solution

Accepted Solutions
Or
MVP
MVP

That's not the correct syntax for an If() statement. You seem to have kept on going after the false condition (50,70,30).

Perhaps:

if(EightD.Kx_Classification='K1S' and Date(EightD.D1_KPIDate+15) > today(),
RGB(220,50,35),

if(EightD.Kx_Classification<>'K1S' and Date(EightD.D1_KPIDate+30) > today(),
RGB(220,50,35),
RGB(50,70,30)))

 

You could also just turn this into a single If() statement using an OR between the two condition sets.

View solution in original post

3 Replies
Or
MVP
MVP

That's not the correct syntax for an If() statement. You seem to have kept on going after the false condition (50,70,30).

Perhaps:

if(EightD.Kx_Classification='K1S' and Date(EightD.D1_KPIDate+15) > today(),
RGB(220,50,35),

if(EightD.Kx_Classification<>'K1S' and Date(EightD.D1_KPIDate+30) > today(),
RGB(220,50,35),
RGB(50,70,30)))

 

You could also just turn this into a single If() statement using an OR between the two condition sets.

brunobertels
Master
Master

Hi 

May be this 

if(EightD.Kx_Classification='K1S' and Date(EightD.D1_KPIDate+15) > today(),


RGB(220,50,35),

if(EightD.Kx_Classification<>'K1S' and Date(EightD.D1_KPIDate+30) > today(),


RGB(220,50,35),
RGB(50,70,30)
)
)

JoseGarcia
Creator III
Creator III
Author

it worked nicely, thanks a million!