Missed the Q4 Fall Release Product Update? Watch the on-demand webinar for more info on the latest in Designer 24.2, Auto Insights Magic Reports, and more!
Free Trial

Alteryx Designer Desktop Discussions

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

Parsing using RegEx

nataliad18
8 - Asteroid

Hey!

Would you please be able to help me parse. Thought RegEx would be the most useful one, but do let me know of any other options. I need to parse on "/" character.

I.E I have two columns path and points

 

Path                       Points

Alteryx/Tableau       6

SQL/R                     5

 

I want these two rows to be split in four, with points halved, meaning, this is the ouput I want:

Path                       Points

Alteryx                     3
Tableau                   3

SQL                        2.5
R                             2.5

 

Many thanks in advance!

Natalia

4 REPLIES 4
atcodedog05
22 - Nova
22 - Nova

Hi @nataliad18 

 

Here is how you can do it.

Workflow:

atcodedog05_0-1632394747117.png

1. Using formula tool to calculate [Total Points] / [count of words]

2. Using Text to column tool to split Path into rows for each word.

 

Hope this helps : )

jdunkerley79
ACE Emeritus
ACE Emeritus

jdunkerley79_0-1632394798165.png

 

I suggest first working out the split points: [Points] / (1+REGEX_CountMatches([Path], "/"))

You can then use a Text to columns tool to split on '/' and make new rows

 

Sample attached

nataliad18
8 - Asteroid

thanks, worked perfectly! accepted as a solution 🙂 

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @nataliad18 

Cheers and have a nice day!

Labels
Top Solution Authors