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

Lock color settings to customers

Hi,

I want to always have the same colors for the same customer. How do I go about doing this in Qlikview?

For example, if I have a stacked bar for sales with 3 customers (A, B, & C) and I want a grey color for A, a green color for B, and a yellow color for C in all charts. If I choose customer A and C in my current file, C switches to the color of B. How do I lock these colors?

Thanks in advance,

Glen

3 Replies
Not applicable
Author

You can create an expression on the Background Color of the expression.

Go to your chart properties, go to expressions tab, open up (click on +) the expression and go to Background color. In the definition area, create an expression something like the following:

IF( Customer='A' , grey(), IF(Customer='B' , green() , IF(Customer='C' , Yellow() , Black() ) ) )


The Black at the end is the final ELSE.

Good luck,

Not applicable
Author

Hi Glennson,

To achieve this, what you have to do is, in the property window of the charts, in the color tab, you will find a check box called "persistent color". Just check this check box in all the charts you want the same color. Once this is done, then the color remains same in all the charts. Hope this helps you. Check this out.

Thanks Joseph.......

Anonymous
Not applicable
Author

Glen,
It depends on what you actually want. If you want the color for each customer to be consistent, but don't care what exactly color is assigned for each customer and don't mind that it may change after reload - follow the advice from Joseph.
If you have a small number of customers, and want a specific color for each - use advice from Nigel West.
If you have a large number of Customers, and want a specific color for each - you need color information in data source.