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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Ability to display a bi-color histogram positive ​​and negative values ??

Hello,

In a histogram of the charges, I have positive and negative values ​​values​​; according to the representative. The X axis represented the representatives and the Y axis represented the amount of charges.

In this histogram, I want to display the amount (bars) up in green, and negative values ​​in red.

Is this possible?

1 Solution

Accepted Solutions
sundarakumar
Specialist II
Specialist II

U have a + sign next to the expresion u have written in the expression tab, if u click this u will get some more options.

Among that select Background color and writre the expression

=if(urexpression>0,green(),red())

please note urexpression is whatever expression you have written in the expression tab.

Hope this helps.

-Sundar

View solution in original post

4 Replies
ThornOfCrowns
Specialist II
Specialist II

You can set the Background Colour of an object using an expression, you could say If(X>0,Green(),Red()) for example.

Not applicable
Author

Hi James,

Thank you for your replay . Can you explain more about this pleaase

sundarakumar
Specialist II
Specialist II

U have a + sign next to the expresion u have written in the expression tab, if u click this u will get some more options.

Among that select Background color and writre the expression

=if(urexpression>0,green(),red())

please note urexpression is whatever expression you have written in the expression tab.

Hope this helps.

-Sundar

nizamsha
Specialist II
Specialist II

Thornofcrowns ,Sundarakumar  Both of them gave the answer what u want

if u got what u want mean close the thread

Nothing to Explain if u r not  giving colors in background all the bars are in single color only

now u want to show positive in green and negative is red mean then u have to give in expression->background

if(sum(sales)>0,green(),red())

what i am telling for single dimension and single expression