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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Beginner_Qlik1
Partner - Contributor III
Partner - Contributor III

To colour a bar in chart with multiple colours

Hi,

I have to colour the bars of chart in colour Green (for consumption  less than 850)and the rest of colour of same bar in red (for consumption more than 850).

Beginner_Qlik1_0-1715013318531.png

So for "03 Tankroom" , bar should be both in green(for <=850) and red(1911-850) color. and other two bars should be in Green color.

Could some one let me know how to achieve this?

 

Thanks in advance

 

Labels (1)
  • Chart

1 Solution

Accepted Solutions
rodrigo_martins
Partner - Creator
Partner - Creator

Just create two expressions in your graph (assuming Sum(Value) is your expression):

if(Sum(Value) <= 850, Sum(Value), 850)

and

if(Sum(Value) > 850, Sum(Value) - 850, 0)

Additionally, you must select the option for stacked display, on Style Tab, Stacked Subtype.

Then, simply define a color for each expression in the Colors tab.

rodrigo_martins_1-1715016893923.png

 

View solution in original post

3 Replies
rodrigo_martins
Partner - Creator
Partner - Creator

Just create two expressions in your graph (assuming Sum(Value) is your expression):

if(Sum(Value) <= 850, Sum(Value), 850)

and

if(Sum(Value) > 850, Sum(Value) - 850, 0)

Additionally, you must select the option for stacked display, on Style Tab, Stacked Subtype.

Then, simply define a color for each expression in the Colors tab.

rodrigo_martins_1-1715016893923.png

 

Beginner_Qlik1
Partner - Contributor III
Partner - Contributor III
Author

Thanks a lot  Rodrigo!

It worked

Beginner_Qlik1
Partner - Contributor III
Partner - Contributor III
Author

Hi Rodrigo,

 

How can I show the limit of field "Value" (here it is 850) in green part of the bar? I tried option "Value on data points" in the "Expression" tab. But it is not working.

 

Thanks in advance