Alteryx Designer Desktop Discussions

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

If statement help

pavanpelluru
7 - Meteor

This is If statement I am trying to add, but I see error

 

if [Pounds_Tile_Num]= 1 then "A"
else if [Pounds_Tile_Num]= 2 then "B"
else "C" endif

 

my [Pounds_Tile_Num] in Int64 and my new field is string format

 

Request help on correcting it.

3 REPLIES 3
DavidP
17 - Castor
17 - Castor

Hi @pavanpelluru 

 

Your second line should be elseif and not else if  (remove the space)

binuacs
20 - Arcturus

@pavanpelluru the IF statement was not correct

 

if [Pounds_Tile_Num]= 1 then "A"
elseif [Pounds_Tile_Num]= 2 then "B"
else "C" endif

 

Spoiler
binuacs_0-1639689332646.png

 

pavanpelluru
7 - Meteor

Thanks DavidP and Binacs, logic worked

Labels