3 Replies Latest reply: Jan 8, 2018 7:08 AM by omar bensalem

# How to separate -ve and +ve values in straight table

I did a expresion to give me the difference in percentage between 2 same values to see how much it change. i want to visualize positive percentage values in one table and negative in the other one.

The expression that im using is this:

Num(1 - Sum({<TimeStamp={'Old'}>}Amount) / Sum({<TimeStamp={'New'}>}Amount), '#,###.#0%')

Any ideas?.

• ###### Re: How to separate -ve and +ve values in straight table

Hi,

you can try like below

for -ve:

if(

Num(1 - Sum({<TimeStamp={'Old'}>}Amount) / Sum({<TimeStamp={'New'}>}Amount), '#,###.#0%')<=0,

Num(1 - Sum({<TimeStamp={'Old'}>}Amount) / Sum({<TimeStamp={'New'}>}Amount), '#,###.#0%') ,0)

for +ve ;

if(

Num(1 - Sum({<TimeStamp={'Old'}>}Amount) / Sum({<TimeStamp={'New'}>}Amount), '#,###.#0%')>0,

Num(1 - Sum({<TimeStamp={'Old'}>}Amount) / Sum({<TimeStamp={'New'}>}Amount), '#,###.#0%') ,0)

Thanks,Deva

• ###### Re: How to separate -ve and +ve values in straight table

and then under adds on; uncheck show zero values

• ###### Re: How to separate -ve and +ve values in straight table

You can call like this?

+ve

Num(1 - Sum({<TimeStamp={'Old'}, Amount={"=Sum({<Timestamp={'Old'}>} Amount)>0"}>}Amount) / Sum({<TimeStamp={'New'}, Amount={"=Sum({<Timestamp={'Old'}>}Amount)>0"}>}Amount), '#,###.#0%')

-ve

Num(1 - Sum({<TimeStamp={'Old'}, Amount={"=Sum({<Timestamp={'Old'}>}Amount)<0"}>}Amount) / Sum({<TimeStamp={'New'}, Amount={"=Sum({<Timestamp={'Old'}>}Amount)<0"}>}Amount), '#,###.#0%')