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: 
Qhog
Contributor
Contributor

Coloring graph by expression

Hello,

I am creating a stacked line chart with three colors corresponding to three possible outputs from a column in my data. However when I issue IF statements in the expression I get grey colors and not the colors that I want. I would greatly appreciate if someone could advise me on what I am doing incorrectly. I also get an error that says that the IF statement takes 2-3 parameters. 

 

=if([Curent week status]) = 'R', red(),
else if([Curent week status]) = 'Y', yellow(),
else if([Curent week status]) ='G', green())))

 

Labels (2)
5 Replies
Kushal_Chawda

your if statement syntax seems wrong

 

=if([Curent week status]) = 'R', red(),
if([Curent week status]) = 'Y', yellow(),
if([Curent week status]) ='G', green())))
Qhog
Contributor
Contributor
Author

Hello and thank you for the correction. Unfortunately that format still does not display any color change, everything is still grey.

Kushal_Chawda

Please post sample app to look at

Qhog
Contributor
Contributor
Author

I apologize but I'm not sure what you are requesting, I'm still new to this forum. I do not have time to anonymize my data at the moment. Can I share a link to my work privately? 

Kushal_Chawda

I am asking if you can provide sample qlik sense application to look at?