Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
New Contributor III

Background color


I have a pivot table and a dimmension called Scenario, and on this dimension I used Background color like this:

=if(Scenario = 'B',rgb(165,219,147),if(Scenario='R',rgb(232,208,232),rgb(252,101,29)))

The problem is that it applies the color only sometimes on 'B' scenario.

'R' and 'A' scenarios remain without background color and I can't understand why.

Thank you!

5 Replies
Esteemed Contributor III

Re: Background color

its fine here chk below


New Contributor III

Re: Background color

I need the background color to be set directly on dimension (in the dimension tab), like this:


Valued Contributor

Re: Background color

Hi Simona,

your expression looks fine to me, I created a qv app with dummy data with same dimenion name and some values, copied your expression as it is and worked.

Maybe you can verify if there's a space or something in your Scenario dimension values. If that's the case you can use trim to compare.

Also you can share your app with dummy data in order to resolver your issue faster.

Hope this helps.

Kind regards,

Not applicable

Re: Background color

Use same expression in  Dimension Background color in Dimension Tab

New Contributor III

Re: Background color

It seems like if the first row of the pivot table has no value in the Database for that scenario, it won't calculate the dimension color.

I found a solution: to generate lines for all dimensions with no values. I don't know that this is the best solution but it works.