Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dimension colors in pivot

Hi,

How to set different colors for single dimension values in pivot table.

Brands is the field having Brand1 India,Brand2 US, Brand3 India etc.

now the country "India" brands should be in "green color" and other should be in "blue color".

how can i do it in pivot table ? And my pivot table should be same as like below image.

Thanks in advance.

Pivot Color dimension.JPG

5 Replies
Not applicable
Author

Hi,

in charts properties --> used dimensions --> check the plus to get the expression editor to enter a condition for the background color of the according dim: (my exam-dim is "DimensionName"):

=if(DimensionName like '*India*', LightGreen(), Lightblue())

HtH

Roland

Not applicable
Author

Hi Roland,

I tried this, it's not working in pivot table but it is working in straight table.

Why it is happening ? or any other way to do it.

Thanks in advance.

Regards,

Venkat

Not applicable
Author

Hi Venkat,

this should work in both chart-types fine. I am personally using it several times. So check for syntax etc. BTW: which Version do you have? I use QV11 SR11.

RR

Not applicable
Author

Hi Roland,

I'm using QV11 SR1.

Please find the attached sample app.

Thanks in advance.

Regards,

Venkat

Not applicable
Author

Hi Venkat,

as I told you: Check for syntax etc. Or do you got a country like India in your country field ? 😉

So try the code below for matching all countries that include "Ireland" in their names:

=if(Country like '*Ireland*', LightGreen(), Lightblue())  // pattern is Ireland !!

RR