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
agigliotti
Partner - Champion
Partner - Champion

are you sure your measure is DIFF_AMOUNT ?

maybe is:

If( Sum(DIFF_AMOUNT) < 0,RGB(255,0,0),RGB(34,139,34) )

Hope it helps.

rangam_s
Creator II
Creator II

In the below expression use complete measure expression instead of "DIFF_AMOUNT ", so that it will work based on bar value.

If(DIFF_AMOUNT < 0,RGB(255,0,0),RGB(34,139,34))

kaanerisen
Creator III
Creator III

Hi Tanay,

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

Anonymous
Not applicable
Author

Hi Andrea,

actually The measure is - Count (distinct [Property No])

To color the bar chart, I am just using color by expression and providing If(DIFF_AMOUNT_EMAIL < 0,RGB(255,0,0),RGB(34,139,34))

as the expression there.


Anonymous
Not applicable
Author

Hi Rangam,

Tried it, but no luck there.

Anonymous
Not applicable
Author

Hi Kaan ,

Still giving the same graph

rangam_s
Creator II
Creator II

Try this

If((Count (distinct [Property No])<=0),RGB(255,0,0),RGB(34,139,34))


what is your dimension here?

Anonymous
Not applicable
Author

my dimension is

Dual(Replace(class(DIFF_AMOUNT, 5),'<= x <', '-') ,class(DIFF_AMOUNT, 5))

rangam_s
Creator II
Creator II

Looks like, you want color based on the dimension you have defined (i.e. ranges), so you need to try different approach not on measure.

You can try based on the value you have used for deriving those range dimensions.