Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Barchart showing incorrect color

This is my condition which i  am using for color by expression .If(DIFF_AMOUNT < 0,RGB(255,0,0),RGB(34,139,34))

However my graph shows a wrong color (ie green) in the -30 to -25 range, when in fact should be red.


IMAGE$2EBC5F24B2896FDF.jpg


Thanks in advance,

Cheers,

Tanay

14 Replies
rajeshqvd
Creator II
Creator II

Please share your app

Anonymous
Not applicable
Author

Yeah , I have the column "diff amount" which has the values,both positive and negative. The idea is ,depending upon that whether it is positive or negative i want to give color to my graph as red or green.but while the entire graph is coming correct, only for the range of -25 to -30 i am getting the wrong color. So not sure whether, its' a bug in qlik sense or a mistake from my end.

rangam_s
Creator II
Creator II

If(sum("diff amount" )<0,RGB(255,0,0),RGB(34,139,34))


Try this, even after if it is giving same color then check the result sum value generated for -25 to -30 range so that you will know what is issue there. If it is negative then it is fine else you need to check the data available in that range.


As far as I know, color by expression is working properly in Qlik sense.


Note: "diff amount"  - is the fields used to generate those intervals.

kaanerisen
Creator III
Creator III

I thought DIFF_AMOUNT is the dimension of barchart.

then replace DIFF_AMOUNT with your dimension name

If(left(dimensionname,1)='-',RGB(255,0,0),RGB(34,139,34))

Anonymous
Not applicable
Author

Hi Rajesh,

It is not possible to share my app but if you need any other information in addition to what i have provided above, kindly let me know