Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Concat string & create new row

123love55448
6 - Meteoroid

I want to search for "Fat" in each row then creating new role for strings that come after "Fat" (if any) by maintaining inputs in other columns the same

Input file:

NameDateList of actions
Mister A9/6/2022Bat, Hat, Rat, Fat, Hat, Rat, Oat
Mister A10/12/2022Rat, Oat, Rat, Fat, That, Rat
Mister B2/8/2022Bat, Oat, Rat
Mister C4/5/2022That, Rat, Fat, Bat, Bat, Hat, Eat

Output:

NameDateList of actions
Mister A9/6/2022Bat, Hat, Rat, Fat
Mister A9/6/2022Hat, Rat, Oat
Mister A10/12/2022Rat, Oat, Rat, Fat
Mister A10/12/2022That, Rat
Mister B2/8/2022Bat, Oat, Rat
Mister C4/5/2022That, Rat, Fat
Mister C4/5/2022Bat, Bat, Hat, Eat

If there is more than one Fat in input row, keep splitting until no "Fat" left in ending row

 

Appreciated all the helps

4 REPLIES 4
IraWatt
17 - Castor
17 - Castor

Hey @123love55448,

Are you wanting to keep the original row like you did with "Bat, Hat, Rat, Fat, Hat, Rat, Oat" or not keep the original row like with "That, Rat, Fat, Bat, Bat, Hat, Eat"?

IraWatt
17 - Castor
17 - Castor

If you are wanting to keep the original row here is one way:

IraWatt_0-1662452600372.png

I split each row to individual actions and use a multirow formula to generate the new text for each row.

 

If you want to learn more about the Multi-Row-Formula Tool the community has some quick and easy videos on the topic here: https://community.alteryx.com/t5/Interactive-Lessons/Multi-Row-Formula/ta-p/82872

 

Any questions or issues please ask

Ira Watt
Technical Consultant
Watt@Bulien.com 

 

JosephSerpis
17 - Castor
17 - Castor

Hi @123love55448 I came up with an approach of using a formula to replace fat, with fat| so I could use | as delimiter in the Text to columns tool to achieve the output you stated.

 

Spilt_06092022.JPG

grazitti_sapna
17 - Castor

@123love55448 , my solution is similar to @JosephSerpis , you can replace the text Fat, with Fat| or some other delimiter instead of , and then split the data to rows using text to columns tool on the basis of |. Attaching the solution hope it helps.

Sapna Gupta
Labels