We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun 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