Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Splitting a string into multiple values

MorneViljoen
7 - Meteor

Hi 

 

I am looking for something to assist me in changing the following type of text:

15-080 3 000 2,868,938,288 5,984,479,335 -52

 

Into

2,868,938,288

5,984,479,335

 

 

So basically a formula or something to only keep the two string values where they contain commas.

Note that the initial string can be longer, but will always have 2 strings which have commas in.

 

Thanks in advance

6 REPLIES 6
Emil_Kos
17 - Castor
17 - Castor

Hi @MorneViljoen,


Text to columns will help you with this task. After you create a row for each position you can simply filter out rows that you don't need. 

 

Emil_Kos_0-1616073394600.png

The output:

 

Emil_Kos_1-1616073420572.png

 

MorneViljoen
7 - Meteor

@Emil_Kos  Thanks, this could work, but one thing I forgot to mention is that I have multiple rows like that (see attached) which would need to be changed. Also added how I think the output should look which I forgot to mention previously.

 

 

Emil_Kos
17 - Castor
17 - Castor

Hi @MorneViljoen,


I have prepared a workflow for you:

 

Emil_Kos_0-1616075365065.png

 

 

The output:

 

Emil_Kos_1-1616075373990.png

 

mpennington
11 - Bolide

I think this RegEx would work:

 

(\d{1,3},.*)\s(\d{1,3},.*)\s|$

 

String Extraction.png

MorneViljoen
7 - Meteor

Thanks this is working great

MorneViljoen
7 - Meteor

@Emil_Kos I tried this one but the column did not format like it should.

But the regex one worked great.

Labels
Top Solution Authors