Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Splitting full file path into small its it is original components

mkhaled
6 - Meteoroid

Hi All, 

I have a filed contains list of full file names and want to split into rows on one filed as follows

 

input

C:\ABC\123.txt

C\AAA\yyy\xcn.pdf

 

needed output

C:\

C:\ABC\

C:\ABC\123.txt

C\

C\AAA\

C\AAA\yyy\

C\AAA\yyy\xcn.pdf

 

is there is anyway to do that with Alteryx

4 REPLIES 4
JohnJPS
15 - Aurora
I would use Text to Columns to split these to rows based on the slash, and follow that with a MultiRow formula with something like:

if [field] == "C:" then
[field] + "\"
else
[Row-1:field] + [field] + "\"
endif

Hope that helps!
John
RolandSchubert
16 - Nebula
16 - Nebula

Hi,

 

SplitToCloumns and Multi-Row-formula do the job - see attached workflow.

 

Best regards

 

Roland

mkhaled
6 - Meteoroid

@JohnJPS and @RolandSchubert  I tested the solution and it is working fine. Thanks for your help.

MarqueeCrew
20 - Arcturus
20 - Arcturus

@mkhaled,

 

Here is a completed workflow (following the suggestion from @JohnJPS ).  If you grant me a solve, please also grant John the same courtesy.

 

capture.jpg

 

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Labels