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.

Perform addition with condition in a formula tool

dunkindonut7777
8 - Asteroid

Hi I have a data here that has a field with lacking of figures I want to add digits based on a condition using formula tool. Example below:

 

CodeSalary
22210000
33320000
35630000

 

Expected output

CodeSalary
22212000
33323000
35630000

 

I just want to add some figures if the code is "222" and "333". How can I perform this?

1 REPLY 1
Adriankp
8 - Asteroid

If the amount you want to add is the same for every instance of '222' or '333' a simple IF statement is all that's required.

 

IF [Code] = '222' THEN

     [Salary] + 2000

ELSEIF [Code] = '333' THEN

     [Salary] + 3000

ELSE [Salary] ENDIF

 

If I'm misunderstanding what it is you want to do, it would be great if you could provide some more detailed information and I can try to help. :)

Labels
Top Solution Authors