In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

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
Top Solution Authors