Alteryx Designer Desktop Discussions

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

Multiple if statement

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

3 REPLIES 3
fmvizcaino
17 - Castor
17 - Castor

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

bpatel
Alteryx
Alteryx

hi @RyanSchilt ,

 

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

 

bpatel_0-1576104629704.png

ups366
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, '-'))))

 

无标题.png

Labels