QlikView defines Persistent Colors as:
Checking this option locks the color map so that each value has a color permanently assigned to it.
There are two advantages to enabling this option in graphical charts.
- Across the application, in charts with multiple colors, a dimensional value maintains the same color in all charts.
- Within a single chart, filtering on a dimensional value will cause that slice to retain the same color. Without Persistent Colors, selecting a slice of a pie chart (if you included one, for some reason) will likely cause it to change to a different color after the filtering takes place.
That said, you may notice that when you check the box for Persistent Colors, the colors in your chart change. How are the new colors being determined, and how does QlikView manage to keep the same color associated with a dimensional value across charts? The answer is found in the order in which the field’s values were loaded into the application.
Every unique value in a field is assigned a number as it is loaded into the application, starting with 1 and incrementing up. This number can be retrieved using the FieldIndex function and is responsible for the sorting when the “Load Order” option is chosen on the Sort tab of an object’s properties.
In the case of Persistent Colors, this field value corresponds with the position in the color map of the chart, i.e. field value 1 is assigned color 1, field value 2 is assigned color 2, etc. After 18, it starts over again with 1 in assigning colors. Because the field index (i.e. load order) never changes, no matter the front end interaction, the color remains the same across charts.
As you can see in this screenshot, South was the first value loaded into the data model, so it was assigned the first color in the color map, even though it is the third slice in the chart.