In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Malformed If Statement

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

3 REPLIES 3
kat
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!

Lund
6 - Meteoroid

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

WillTravelForData
8 - Asteroid

Here is the formula that I would use:

 

ST Formula.PNG

Labels
Top Solution Authors