Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Multi Conditional IF statement (malformed error)

CherieACI
8 - Asteroid

I'm trying to write a multi conditional if statement but I'm getting the malformed if statement error. I have defined 2 columns in a previous formula to be either true or false. Now I want to compare these 2 columns and if both columns are true then I want this new column = true, if they are both false I want the result = true otherwise false. Here is my if statement: 

 

If [On Last Month Not on this Month] ="True" and [On this Month Not on Last Month] = "True" then "True"
else if [On Last Month Not on this Month] ="False" and [On this Month Not on Last Month]="False" then "True"
else "False" endif

CherieACI_1-1638823457246.png

 

 

The previous formula defining the 2 columns as True/False: 

CherieACI_0-1638823369217.png

What am I doing wrong? 

Thanks in advance!

3 REPLIES 3
Luke_C
17 - Castor

Hi @CherieACI 

 

If you're using 'else if' you will need to put 'endif' twice at the end of your formula. You could also change the 'else if' to 'elseif' and it should work as is. 

CherieACI
8 - Asteroid

Oh my goodness, changing the 'else if' to 'elseif' worked! Thank you so much!

Luke_C
17 - Castor

Happy to help @CherieACI! Don't forget to mark the solution.

Labels