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

Separating Data based on number of characters

RB90
6 - Meteoroid

Hi All,

 

I was given a set of data that has two different types of numbers co-mingled together (NABP and NPI). My NABP numbers have 7 characters while my NPIs have 10. I'm looking to use the formula tool to add a column that indicates which is which but I have no idea what that syntax would look like. Can anyone help?

 

Thanks!

1 REPLY 1
Thableaus
17 - Castor
17 - Castor

Hi @RB90 

 

Try this:


IF Length(ToString([Field])) = 7 THEN "NABP"

ELSEIF Length(ToString([Field])) = 10 THEN "NPI"

ELSE "Others" ENDIF

 

Cheers,

Labels
Top Solution Authors