Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Extracting specific data from a string

AndreBln
5 - Atom

Hi, 

 

i am trying to extract certain data from a string field. The issue is that the data to be extracted come in different formats:

 

texttext text, text 123km text, text text 10.0km

text 26.5km text texttext

text text 47.77km

texttexttext 39.87 km text

text 12 km, text

text,text 56.1 km

and so on.

 

Any idea how to extract the km lengths from the string fields and convert them into a numeric data type?

 

 

 

Thanks in advance

Andre

7 REPLIES 7
Emil_Kos
17 - Castor
17 - Castor

Hi @AndreBln,

 

I believe you need to change the data type to double:

 

Emil_Kos_0-1603965210883.png

 

The output:

 

Emil_Kos_1-1603965227925.png

 

 

If this was something helpful please mark as an answer!

 

atcodedog05
22 - Nova
22 - Nova

Hi @AndreBln 

 

Here is a workflow for the task.

Output:

atcodedog05_0-1603965268168.png

 

Workflow:

atcodedog05_1-1603965280624.png

 

 

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

AndreBln
5 - Atom

thanks for your support. I didn't specify the problem well enough, so i updated the problem description.

atcodedog05
22 - Nova
22 - Nova

Hi @AndreBln 

 

Here is a workflow for the task.

Output: you can

atcodedog05_0-1603965758525.png

 

Workflow:

atcodedog05_1-1603965769504.png

You can split on rows to by changing option like below in Regex tool

atcodedog05_0-1603965841830.png

 

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

atcodedog05
22 - Nova
22 - Nova

Hi @AndreBln 

 

Here is a workflow for the task giving numeric info. If there is multiple km its split into rows.

Output:

 

atcodedog05_0-1603966371407.png

Workflow:

atcodedog05_0-1603966318202.png

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

AndreBln
5 - Atom

Great stuff! Thanks a lot

atcodedog05
22 - Nova
22 - Nova

If it solved your task please mark the posts as solution.

 

Happy to help 🙂 @AndreBln 

 

Cheers and Happy Analyzing 😀

Labels