Alteryx Designer Desktop Discussions

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

Split data using regex or any other tools

mihaicom20
8 - Asteroid

Hello,

 

There is a simple question, but I don't know how to apply it with regex or any other tools.

I would like to split a number like in the following example:

 Input: 579824.13596816.79

Col1: 579824.13

Col2: 596816.79

Basically I want to split the number in 2 Col, taking the 2 digits after "."

 

Thank you in advance!

5 REPLIES 5
atcodedog05
22 - Nova
22 - Nova

Hi @mihaicom20 

 

Here is how you can do it.

Workflow:

atcodedog05_0-1647445538445.png

 

Hope this helps : )

 

binuacs
20 - Arcturus

@mihaicom20 Another Regex Tokenize 

binuacs_0-1647445848393.png

 

mihaicom20
8 - Asteroid

Thank you so much @atcodedog05 

After I posted the topic I tried also this one and it worked, but I will use the one provided by you. Idk how sensitive is mine lol :

mihaicom20_0-1647445836921.png

 

MarqueeCrew
20 - Arcturus
20 - Arcturus

@mihaicom20 ,

 

I just wanted to show you a non-RegEx approach.  Look at the data and use the decimal (.) as a delimiter.  You're left with 3 columns of data.  Col1 + . + the first 2 digits of Col2 is one answer and so on....

 

Use a Text To Columns tool:

  • Split your field using . as a delimiter
  • Number of columns = 3
ToNumber([1]+"."+Left([2], 2))

and

ToNumber(Substring([2],2)+"."+[3])

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
atcodedog05
22 - Nova
22 - Nova

Hi @mihaicom20 

 

Your method should work too. Its similar to @binuacs method

 

Happy to help : )

Cheers and have a nice day!

Labels