Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
toby_booth
Contributor II
Contributor II

Qliksense - Chart columns colour based on positive or negative values

Hello all,

This seems simple to me but I still cannot find a solution. In a simple bar chart, I have Profit and Loss figures. I would like to show each column as a different colour depending on whether the value is positive or negative.

Green for Positive, and Red for Negative.

I have attempted to use the Expression formulas for the actual data point with simple If...Then statements e.g. sum(item>0,Green(),Red())and the same in the Appearence>>Colors and legend options. Nothing works for me.

Is this a solved issue? I couldn't find a solution after hours of searching.

Thanks.

Labels (1)
  • Chart

3 Replies
vmoreno2605
Creator
Creator

This is what you can do

if(yourvalue>0,green(),red())

In this option

imagen2.PNG

I hope this helps

toby_booth
Contributor II
Contributor II
Author

QS - 2018-11-08 08_35_49-QS Chart colour function.png

As you can see in the image, the issue is that there are two elements in the bar chart. Using that expression affects ALL the elements, where as I only want one affected. Is there a solution for this?

MK9885
Master II
Master II

if(YOUREXPRESSION>0,green(),red())