Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
May 10, 2022 3:23:50 PM
May 24, 2017 10:05:43 AM
Qlik Sense allows you to create custom colors for your Measures and Dimensions in a Bar Chart, Line Chart etc. by using Master Items and Color Library.
Qlik Sense Enterprise on Windows
Qlik Cloud
Qlik Sense Business
Follow these steps:
Create your Master Item using one of your "Measure" or "Dimension" (in this example we will use a "Dimension" called "Dim1"), select the desired dimension and click "Save":
2. Now go to "Master Items" and click to the Master Item we just created (Dim 1), right click and "Edit":
3. Now go to the second sheet called "Value colors" and set the colors for each dimension (in this case green, red and yellow) and click "Save":
4. Now we can build our chart with the Master Item we just created, just drag the Master Item to the chart and then add a measure (Expression 1 for example), as you can see, it is not displaying the colors:
5. To make the colors display, you need to select the chart, then go to "Appeareance" > "Colors and legend" and set Colors to Custom and select "By dimension" and then select the dimension you created in the Master Item (Dim1 in this case), and make sure set "Library colors" to "On":
With this approach, it is also possible to use custom colors in your legend which is not the case when using "Color by Expression".
It is also possible to get persistent colors by dimensions and expressions in chart as shown in this article.