Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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
MVP
MVP

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
MVP
MVP

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
MVP
MVP

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