Alteryx Designer Desktop Discussions

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

Split rows into multiple based on word or comma count

Anuj_saxena01
6 - Meteoroid

Hi Experts,

As a requirement where I to put 5(let) words in each row. but in input file I am getting more in each row. Example(Sample)

 

Input File-

 

LanguageNameMarket
HindiAkash Kumar,Aman,Shyam,Lokesh,Mukesh,Tushar,SahaIN
PunjabiCharan,Sukh,AK Singh,Lovish,Kush,KumarUS

 

So here In Name column we have 7 words(asperated by comma) in row 1 and in row 2 we have 6. So I just need 5 name in row 1 hence Tushar and Saha should come in 2nd row in output. Is this possible in ALteryx?

Output Expected-

LanguageNameMarket
HindiAkash Kumar,Aman,Shyam,Lokesh,MukeshIN
HindiTushar,SahaIN
PunjabiCharan,Sukh,AK Singh,Lovish,KushUS
PunjabiKumarUS

 

Thanks in advance

5 REPLIES 5
Jean-Balteryx
16 - Nebula
16 - Nebula

Hi @Anuj_saxena01 ,

 

here is a workflow that splits your rows then rebuild them with a limit of 5 name for each row.

 

If you want to change how many names you get per row, you just need to change the value of the modulo function in the second "Multi-Row formula tool".

atcodedog05
22 - Nova
22 - Nova

Hi @Anuj_saxena01 

 

Here is how you can do it.

 

Workflow:

atcodedog05_0-1626687940003.png

1. Split names into rows using text to col.

2. Using multi-row formula tool create groups sub id.

3. Using formula grouping into 5 names.

4. Summarize on group to conact names of 5.

5. Using select tool keep required columns.

 

Hope this helps : )

 

Anuj_saxena01
6 - Meteoroid

@Jean-Balteryx @atcodedog05 Thank you for the quick response. It helped. Appreciated

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @Anuj_saxena01 

Jean-Balteryx
16 - Nebula
16 - Nebula

Just as @atcodedog05 said ! 😉

Labels