community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE
SOLVED

Malformed If Statement

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?

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!

Meteoroid

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

Here is the formula that I would use:

 

ST Formula.PNG

Labels