We have extended our Early Bird Tickets for Inspire 2023! Discounted pricing goes until February 24th. Save your spot!

Alteryx Designer Discussions

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

Formula or Expression to split 1 string field into 2 new field columns

hbland2
6 - Meteoroid

How can I split 1 cell field into 2 new columns in Alteryx. How can I re-create Column C & D, with column B (I already have) the below?

hbland2_0-1600806892657.png

 

Any assistance on formulas? Thanks!

3 REPLIES 3
randreag
11 - Bolide

hello @hbland2 

 

You can accomplish this in many ways

 

1. with Left([Assigment], 10) for PO and right([Assigment], 1)

 

2. Using Substring giving the lenght of the two parts

 

3. Using regex, although this is complicated for this use case .

 

I think you can accomplish with the option 1 or 2

 

Regards

 

vizAlter
12 - Quasar

Hi @randreag — Try this solution too... using RegEx tool using Parse output method:

 

 

(\d{10})+[0]+(\d+)

 

Here, 1st Group ( ) picks up the 1st 10 digits, then last Group ( ) picks up the remaining digits which are in the end.

vizAlter_1-1600809355950.png

 

FYI — I have done the same thing using Formula tool for your reference.

 

Please mark it "Solved" or "Solved" with a Like if it resolved your query. This will help other users find the same answer/resolution.  Thank you.

hbland2
6 - Meteoroid

Your solution worked! Thanks!

Labels