Alteryx Designer Desktop Discussions

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

If formula with left retrieval

cfine
7 - Meteor

I am new to Alteryx and I am trying to create a formula which will provide me either the left most 4 or 6 characters of a string based on if they begin with 5050.  If 5050 then return 6 all others will be 4.

 

16010500000000300     would return 1601

50506000010000001     would return 50506

 

I appreciate the help.

Thanks

1 REPLY 1
JessieC
Alteryx
Alteryx

@cfine 

 

IF Left([Field1], 4)="5050" THEN Left([Field1], 6)
ELSE Left([Field1], 4)
ENDIF

 

See attached workflow.

Labels