Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
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
Valued Contributor II

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

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

4 Replies
thornofcrowns
Valued Contributor II

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

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

Not applicable

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

Hi James,

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

sundarakumar
Valued Contributor II

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

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
Valued Contributor II

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

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