Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Filter question

garretwalters12
8 - Asteroid

The following formula is showing as a malformed if statement:

 

if Length([state]) = "2" then [State2] else [state]

 

Both State columns are listed as string data types

1 REPLY 1
Thableaus
17 - Castor
17 - Castor

Hi @garretwalters12 

 

You missed an ENDIF at the end of your formula.

 

Besides, Length formula results in a number, it can't be a string. 

 

if Length([state]) = 2 then [State2] else [state] ENDIF


Cheers,

Labels
Top Solution Authors