Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Setting bar chart colours based on dimensions


I have a bar chart showing a summed value across all the values of a text dimension. I would like to highlight/change the colour of one bar based on a selection filter. The chart is created using a set analysis - so the formula is SUM({$}Value). This creates a chart showing all the sum of Value for each dimension.

So far I have tried using a formula in the Background Colour option of the expression, and also using the formula in the 'Colors' tab. Neither if these seem to work... At the I'm using a static value to try and get it up and running - the formula I'm using is IF(Dimension='X',red(), yellow()) but it seems that the Dimension parameter isn't being passed through as all bars are yellow. Could this be because of set operator I'm using, or something else?

Unfortunately I can't paste an example as I'm using sensitive data. Any help would be much appreciated though!

3 Replies
Not applicable

Re: Setting bar chart colours based on dimensions

Using "GetCurrentField(Group_Name)" you can achieve it..




Re: Setting bar chart colours based on dimensions

A background color expression like

=if(Dim1 ='B',blue() )

should work. Check attached.

Valued Contributor

Re: Setting bar chart colours based on dimensions

whatever expression/Dimension you created for chart , let say ABC

there will be + sign before it

looking like +ABC

please click on the + sign and you will get 4-5 option under it.
click on background

Give condition if(getfieldselection(field name)='xyz',RED());

Community Browser