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

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Announcement | We'll be doing maintenance between 9am-11am MT on Saturday, January 25th, which may impact your experience. Thanks for your patience as we work on improving the community!
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