community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
#SANTALYTICS

The highly anticipated Alteryx Community tradition is back! We hope you'll join us!

Learn More
SOLVED

Malformed IF statement

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.

 

Highlighted
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

 

Alteryx Certified Partner
Alteryx Certified Partner

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 reboot. Order shall return.
Labels