Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
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 - Contributor III
Partner - Contributor III

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

2 Replies
rodrigo_martins
Partner - Contributor III
Partner - Contributor III

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