Alteryx Connect Discussions

Find answers, ask questions, and share expertise about Alteryx Connect.

Splitting data from 1 column to 2

nobbsl
5 - Atom

Hi there

I'm a newby to Alteryx and hoping someone can please help with how to solve the below.

 

 

I have a spreadsheet with multiple columns. 1 column of data is as per below.  How would I go about splitting the data into 2 columns based on certain conditions. Eg. I need to separate the data beginning with 124 into a separate column but keep the data on the same row.  I'm thinking it might be a formula tool? but not sure what condition? to use?

 

P-01234.01.92

S-04567.03.05

124000034

124000043

P-02345.01.03

P-02345.01.02

124000023

Thanks

 

 

1 REPLY 1
KGT
8 - Asteroid

A formula tool will get you there. This formula should work for that example to create [newfield]:

IIF(StartsWith([data],'124'),[data],[newfield])

 

If you want multiple conditions then use the same principle but If Then Elseif Then Elseif Then Else ENDIF rather than IIF()

 

Oh, and if you want to split 124000023 into 124, 000023, then use left([data],3) and Right([data],Length([data])-3)