community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE
SOLVED

Need to split out the first 5 digits of a string into a new row

Highlighted
Atom

Hi,

 

I am working on a workflow, and part of it, I need to split out a string, so I can separate out the first 5 digits into a new row. Thanks in advance! For example:

 

So I only want the first 5 digits of center to be split into a new row.

 

Input 
TypeValue
CENTER1111199999
CENTERName999TESTTESTTEST
  
  
Output 
TypeValue
CENTER1111199999
CENTERName999TESTTESTTEST
CENTERNEW11111

Something like this might work for you

2018-12-21_17-28-49.png

 

Use the filter to pick rows you need (just Center in example you gave)

Adjust the values with formula tools

Finally union back together with original data

Meteor

Maybe something along the lines of this may help?  I'm splitting out the CENTER from CENTERNAME using the filter tool then I create a new field that only looks at the first 5 characters of CENTER.  I then transpose that new field so the new field name becomes part of the row.  I change the newly transposed field to match the original input (Type) and then union the original to the updated.

 

Hopefully that all makes sense or helps out.

Labels