3 Replies Latest reply on Feb 5, 2019 4:18 PM by Anand Bale

# Changing Bar Line with Positive/Negative changes

This picture just shows a divergence if the value is negative, I need it RED if the value drops or GREEN if it raises from the previous value.

(This is v10.4)

I don't have a scrubbed workbook that I can load without revealing confidential data.

• ###### 1. Re: Changing Bar Line with Positive/Negative changes

Hi, Nick

the general solution will be having a calculation to look up the current value and previous as shown below and determine whether it is greater than 0 or not. and drag it to color.

Hope this helps

ZZ

• ###### 2. Re: Changing Bar Line with Positive/Negative changes

Perfect! Thanks!

I got that whole "Aggregate error" since my value was already aggregated, so I had to adjust my calculation as:

LOOKUP([EMAC % Total],0) - LOOKUP([EMAC % Total],-1)

But it worked like a charm:

• ###### 3. Re: Changing Bar Line with Positive/Negative changes

Hi Nick,

Use this Logic:

if sum([Profit])>lookup(sum([Profit]),-1) then 'Green' elseif sum([Profit])<lookup(sum([Profit]),-1)

then 'Red'  end