Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
Not applicable

Changing background color based on text

Hi All,

New to Qlik Sense but been around Qlikview for 8 years. I am trying to change the background color of an individual cell based on a text value.

I have a column named statCol  which could be 1 on the following possibilities : 'R', 'G' or 'Y'

In the Background Color Expression I have entered :

If(statCol= 'R', red(),

    If(statCol = 'G', green(),

          If(statCol = 'Y', yellow(),lightgray())))

The background color based on the first rows value of statCol is repeated for every row instead of being painted based on the expression for each individual row/col . Is this normal Qlik Sense functionality?

I have searched but can't find out if what I am trying to do is not possible or is my expression  poorly written?

Kind Regards,


1 Reply
Honored Contributor II

Re: Changing background color based on text

It should work Bill

I just applied to one of my tabes and it worked as expected

Inserted in Background Exprenssion

If(NOC = 'Great Britain (GBR)', red(),

    If(NOC ='United States (USA)', green(),

          If(NOC = 'China (CHN)', yellow(),lightgray())))

And got this...

As long as your column is a Dimension rather than measure it should work.