Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Extract data without delimiters

nfernandez3
5 - Atom

Hi Community. 

 

I'm trying to extract data from 1 column which contains alphanumeric values with two different length (8 and 9). 

 

Could you please helpme with that. 

 

Many Thanks. 

 

 

5 REPLIES 5
Prometheus
12 - Quasar

@nfernandez3 What are you trying to get out of this column? Are you trying to get less characters than are present or?

nfernandez3
5 - Atom

If length is 9, i need to extract 8 values from left to right or

 

If length is 8, i requires to extract 7 values from left to right   

 

Both results in one column. 

 

Thanks in advance!

Prometheus
12 - Quasar

@nfernandez3 You can use the Formula tool to create a single column using this expression: 

if Length([ID])=9

then Left([ID], 8)

elseif Length([ID])=8

then Left([ID], 7)

else null()

endif

Length.PNG

OllieClarke
15 - Aurora
15 - Aurora

Hi @nfernandez3 you could also use the left() and Length() function combined like:

LEFT([Field],Length([Field])-1)

Hope that helps,

 

Ollie

nfernandez3
5 - Atom

Excellent ! It works. 

 

Thank you so much for your quick response!

Labels