ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. 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

crefsgaard
6 - Meteoroid

Hi,

 

I am writing a quite simple if-statement on the "Periode" variable, which contains either the year 2014, 2015, 2016 or 2017. My try can be seen in the picture. Any suggestion to how I can make it work?

 

Thanks,

Chris

 

 

1 REPLY 1
tcroberts
12 - Quasar

In Alteryx there is a difference between

ELSE IF

and

ELSEIF

 

With ELSE IF, you're required to have an ELSE ENDIF statement for each one. In your function, I believe if you remove the spaces between each of the ELSE and IFs in the middle bit of your expression, I believe it should work.

 

Let me know if this doesn't fix it,

 

Cheers!

Labels
Top Solution Authors