Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Convert the numbers from a column to negative values

soncoku
9 - Comet

Greetings everyone.

 

I have two columns. One is Withdraw and the other one is Deposit.
As you can see only one of them can have data in one row.

 

I want to create a new column called Amount which would store the value of the column which has data.

BUT...

If it is from Withdraw I need to convert it to a negative value

if it is from Deposit it should stay positive.

 

Can anyone help me with such a formula?

 

 

2 REPLIES 2
RolandSchubert
16 - Nebula
16 - Nebula

Hi @soncoku ,

 

you could try the formula:

 

ToNumber([Deposit]) - ToNumber([Withdraw])

 

Let me know if it works for you.

 

Best,

 

Roland

 

soncoku
9 - Comet

apparently it was easy, I just needed a coffee.

Cheer everyone.

 

iF [Withdraw]!=Null() THEN [Withdraw]*-1 ELSE [Deposit] ENDIF

Labels