Alteryx Designer Cloud Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Cloud.
SOLVED

I have an id column and for each of these ids there are one ore more"tags". However, each individual tags for a given id are in different rows. I want to concatenate these tags with a delimiter and convert them to one row. I am attaching sample rows.

GD88
8 - Asteroid

Appreciate your help.

 

G

 

 

2 REPLIES 2
Trifacta_Alumni
Alteryx Alumni (Retired)

Hi Gabby,

 

You could try a two step process:

First, use the 'Group By' task to group by movieId and aggregate all the tags into a list using the LIST function.

Second, use the 'Edit With Formula' task with ARRAYMERGEELEMENTS function to convert the list of values into a single string.

 

Here is an example recipe:

groupby group: movieId value: LIST(tag) type: agg

set col: list_tag value: ARRAYMERGEELEMENTS(list_tag, '|')

Trifacta_Alumni
Alteryx Alumni (Retired)

@Gabby Deal? The above answer by Sean is the most elegant way to put it. In case you are looking for only unique tags you can replace LIST function with a UNIQUE function.