Alteryx Designer Desktop Discussions

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

Field Character Count

jodester77
5 - Atom

I'm trying to build a character count into a formula.  Basically, if field 1 is 9 characters long, I want it to give me a certain value in a new column.  I can't seem to figure out how to do this.  I'm not matching a certain character, just need a count of the characters in field 1.  Any suggestions?

2 REPLIES 2
MarqueeCrew
20 - Arcturus
20 - Arcturus

 

IF Length([Field 1] = 9 THEN "NINE"

ELSE Null()

ENDIF

Null() could be anything that you wanted.  "NINE" could be "9" or 9 depending upon the data type.  You could even just make the column a byte and use:

 

Length([Field 1])

Then decide what to do later....

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
jodester77
5 - Atom

That did exactly what I needed.  Thank you!

Labels