Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Showing results for 
Search instead for 
Did you mean: 

Custom colours in stacked bar chart in Qliksense

Hi All,

I have strange a requirement to colour stacked bar chart. I have to colour dimension values (col A in red, col B in blue and col C in Green) and rest of the dimension values (col D to H ) should be coloured with default colours. Is this possible?

8 Replies
Specialist III
Specialist III

I think not possible

Contributor II
Contributor II

Hi Manoj,

I am afraid that's not possible.

Creator III
Creator III


what you want to do is possible. It is just a little bit complicated. You wil have to set colors for all columns (it is not possible to set only three and let the rest "default")

Do you use only one measure (like sum(sales)) and it is split by dimension (col A)?

If so, than go to Apperance->colors and Legend, set colors to custom and select by expression.

Than set it like this

If(<your dimension>='col A',RGB(170,255,106),

If(<your dimension>='col B',RGB(85,232,216),

    If(<your dimension>='col C',RGB(232,192,85),

        If(<your dimension>='col D',RGB(124,116,255),

            If(<your dimension>='col E',RGB(255,123,99),

                If(<your dimension>='col F',RGB(153,129,96),

                    If(<your dimension>='col G',RGB(204,127,27),

                        If(<your dimension>='col H',RGB(27,204,72)))))))))

Of course use your own RGB value (or if you like it you can use this ) You should get something like this


You can refer


In Stacked Bar chart - Add Dimensions, measures.

Appearance - Colors & Legend - By dimension.

For Expression wise color apply:

Use below expression, tweak your main expression.




Thanks guys for your suggestions. I got to know this is not possible.

Contributor II
Contributor II

I think it's a new feature, but I am using the feb 19' version and now we have a solution for that.

1-) Create a master dimension with the exact field name you want to select the color, put a name on it, clik "Add dimension" and "Done".














2-) Right click in the dimesion created, and then go to Value color and select a color for each factor on the list.



3-) Now when you create a stacked bar chart, the colors will follow your instructions for this field.


Hope it helps.

Contributor II
Contributor II

this is really helpful.

After adding custom colors by expression,  graph lost its Index. anyway to show it as per newly applied colors.