In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

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
Top Solution Authors