Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
The Expert Exam is now live online! Read about the specifics and what it took to bring it to life in the blog by our very own Elizabeth Bonnell!
SOLVED

Malformed If Statement

Highlighted
8 - Asteroid

IF [ST]='NY' THEN "NYC"

 

I am receiving a malformed if statement error with the above formula. Can you explain why this is and how can I correct?

Highlighted
12 - Quasar

Hi @garretwalters12

 

You need to finish your IF statement by adding an else and an endif.

 

IF c THEN t ELSE f ENDIF

 

https://help.alteryx.com/2018.2/Reference/Functions.htm

 

Hope that helps!

Highlighted
6 - Meteoroid

IF [ST]='NY' THEN "NYC" else [ST] endif

Highlighted
8 - Asteroid

Here is the formula that I would use:

 

ST Formula.PNG

Labels