# Alteryx Designer Discussions

###### ALTER.NEXT:

Join us on Dec 2 for a half-day virtual analytics + data science event!
US & CA customers only

It's the most wonderful time of the year - Santalytics 2020 is here! This year, Santa's workshop needs the help of the Alteryx Community to help get back on track, so head over to the Group Hub for all the info to get started!
SOLVED

## Multiple if statement

Highlighted
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?

Highlighted
Alteryx Certified Partner

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

Highlighted
Alteryx

hi @RyanSchilt ,

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

Highlighted
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