Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Marilyne
Contributor II
Contributor II

How to use calculated dimension's color in visualization?

Hello experts,

I have assigned colors by value to a calculated dimension. This dimension calculates slices.


The problem is that I cannot get the colors assigned to each slice in the dimension to appear in a Qlik bar chart or when I create a pie chart by selecting “color by dimension.” However, it works fine with Vizlib charts by selecting "Use master item colors".

Are there specific rules between Qlik and Vizlib charts? What are the best practices with calculated dimensions for colors? How can i get a good Qlik bar chart with my colors?

Here are some pictures with Qlik graphics.

Marilyne_0-1754300809181.png  This is KO and 

Marilyne_3-1754301148673.png

this is KO too

 

 

Marilyne_1-1754301031711.png

This is OK but 

Marilyne_2-1754301091932.png

this is KO while it's supposed to stay the same

 

 

Labels (3)
1 Solution

Accepted Solutions
Marilyne
Contributor II
Contributor II
Author

I found the solution finally. Instead of selecting the real dimension (DDA_Tranches) in the color section, we need to select "dimension 1" and it works well. 

Marilyne_0-1756740401704.png

 

View solution in original post

5 Replies
vkramBI4Qlik
Contributor III
Contributor III

I'm sure there must be multiple solutions for this , But you can create a custom color palette using Qlik themes in JSON and CSS

From Qlik help

https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/Extensions/Content/Sense_Extensions/C...

Some prior blogs may help 

https://community.qlik.com/t5/Design/How-to-create-a-custom-theme-in-Qlik-Sense/ba-p/1471937

Thanks.

Marilyne
Contributor II
Contributor II
Author

Hello, thank you for these tips. However, our customers need this feature to work with the colors of the dimensions assigned in the master item.

What's strange is that when the dimension is just a field (i.e., not calculated), I don't have this problem.

vkramBI4Qlik
Contributor III
Contributor III

Looking at the screenshots you provided, I think your charts are already being controlled by custom theme that you have in place for the dashboard. To verify go to the "Settings" => "Application Theme" and see if there is a custom theme. If you find a custom theme there, change it to "Sense Classic" and test it.

Thanks

Marilyne
Contributor II
Contributor II
Author

Hello,

Thank you. I tried what you said, but unfortunately the problem persists.

Marilyne
Contributor II
Contributor II
Author

I found the solution finally. Instead of selecting the real dimension (DDA_Tranches) in the color section, we need to select "dimension 1" and it works well. 

Marilyne_0-1756740401704.png