We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

CHANGING THE SIGN OF THE NUMBER

dunkindonut7777
8 - Asteroid

Hi I would just like to ask if how can I change the sign using the debit/credit indicator fields. I want to know the exact formula to use so that its easy for me to transform. I want to change the sign with negative (-) if it is "C". Here is the sample data:

 

D/CAmountExpected Amount
D100100
C100-100
D5050
C50-50
1 REPLY 1
Emil_Kos
17 - Castor
17 - Castor

Hi @dunkindonut7777,

 

This is relatively simple. You need to use the formula tool and use this formula:

 

IIF([D/C]='C', [Amount]*-1, [Amount])

 

We will just multiply your value by -1 to get the expected outcome.

 

Emil_Kos_0-1632568052030.png

 

Labels
Top Solution Authors