Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Malformed IF statement

Kirstyp
8 - Asteroid

Hi

 

I am struggling with seeing the problem with this IF statement (used within a formula tool to create a new column).

 

IF Contains([SER Description],'Elderly' AND [Placement term]='Long') Then 'Residential - EMI Long Term' ELSE 'Residential - EMI Short Term ELSE ' ' ENDIF

 

The formula output is a V_WString type fields and both fields within [ ] are V_WString type fields.

 

Probably very simple - thanks in advance.

 

2 REPLIES 2
adm510
11 - Bolide

Looks like you didn't close your contains function, try this:

 

IF Contains([SER Description],'Elderly') AND [Placement term]='Long' Then 'Residential - EMI Long Term' ELSE 'Residential - EMI Short Term' ENDIF

 

MarqueeCrew
20 - Arcturus
20 - Arcturus

IF

Contains([SER Description],'Elderly')

AND [Placement term]='Long'

Then 'Residential - EMI Long Term'

ELSE 'Residential - EMI Short Term'

 ENDIF

 

if c then T else F endif

 

if c then T elseif c2 then T else F endif

 

some potential help

 

 

cheers

 

mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Labels