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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Joey_eklund39
Contributor
Contributor

Background color if value equals...

Hi! I am very new to Qlik. I have an expression saying if the column has value "N" turn background red.

=if([Column] = 'N',red(230))

I would also like to add in an expression so I can turn values with a "Y" to a Green background.

How would I add this into my expression?

Labels (5)
1 Reply
datagrrl
Creator III
Creator III

=if([Column] = 'N',red(230),if([Column] = 'Y',Green(100)))

If course nested IFS are frowned upon, so there might be a better way to do this.

I will say that it is better for performance to try and do this work in the script when you can or even create a master item where you select colors for the Dimension Values, but this should work. I normally go to the master item route, unless it is a different column I need to assign a color to.