ALTERYX INSPIRE | Join us this May for for a multi-day virtual analytics + data science experience like no other! Register Now
alteryx Community

# Alteryx Designer Discussions

SOLVED

## Multiple if statement

5 - Atom

I have created a column to calculate total number of months employed(DateTimeDiff(DateTimeToday(),[Position Start Date],"months") and have labeled that column "Months Employed". I need to create an additional column with the below logic for

• If months 1-6 = Base Rate*1.15
• If months 7-9 = Base Rate*1.10
• If months 10-18 = Base Rate*.867
• If months 19+ = Base Rate

Any tips?

16 - Nebula

Hi @RyanSchilt ,

You could use a formula tool and insert the following if statement.

[Base Rate]*
IF [months]<=6 then 1.15
elseif [months]<=9 then 1.1
elseif [months]<=18 then 0.867
else 1
endif

Let me know if that works.

Best,

Fernando Vizcaino

Alteryx

hi @RyanSchilt ,

here is what i came up with. hope it helps.

8 - Asteroid

Dear , formula as below:

IIF([months employed]>18, [base rate], IIF([months employed]>9, [base rate]*0.867, IIF([months employed]>6, [base rate]*1.1, IIF([months employed]>0, [base rate]*1.15, '-'))))

Labels