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 error on a simple If formula

Goran
8 - Asteroid

Hi everyone,

 

Really not sure what I'm doing wrong here.  I have the following IF statement: 

 

IF [RecordID] = 1 THEN ([Core Time]+[Work Out]) END

 

I keep getting that Malformed error message regardless how I wrap the 1 whether it ends with END or ENDIF.  

 

RecordID is a calculated field, so perhaps that's the issue?

 

Any help would be appreciated!

3 REPLIES 3
afv2688
16 - Nebula
16 - Nebula

Hello @Goran 

 

You are missing the else statement

 

IF [RecordID] = 1 THEN ([Core Time]+[Work Out]) ELSE <SOMETHING HERE> ENDIF

 

for example:

 

IF [RecordID] = 1 THEN ([Core Time]+[Work Out]) ELSE [Core Time] ENDIF

 

Regards

mpennington
11 - Bolide

The syntax should be:

 

IF [RecordID] = 1 THEN ([Core Time]+[Work Out])  ELSE '' ENDIF

Goran
8 - Asteroid

Thank you.  I didn't realize IF statements always needed to have an ELSE

Labels
Top Solution Authors