Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

group and concatenate

Johmz
8 - Asteroid

Need help to group data and concatenate if different input

 

Input

STATEPRODUCTSORT
FloridaAppleBox
FloridaOrangeBag
OhioAppleBox
OhioAppleBag
KansasAppleBag
KansasOrangeBag
NevadaAppleBox
NevadaOrange 

 

 

Output

STATEPRODUCTSORT
FloridaApple/OrangeBox/Bag
OhioAppleBox/Bag
KansasApple/OrangeBag
NevadaApple/OrangeBox
5 REPLIES 5
apathetichell
19 - Altair

summarize tool. group by state. concatenate product. concatenate sort. / is your delimiter.

 

although in your case - it might make more sense to split this up into two streams. do two summarizes in each (group by/group by and then group by/concatenate) (to get each unique sub entry of sort/product) - and then rejoin on state after the concat. you can filter out blank fields if you want prior to concatenating. 

binuacs
21 - Polaris

@Johmz Multiple summarise tool to remove the deplicates before the concatenation

 

image.png

Johmz
8 - Asteroid

Thanks apathetichell. its a big help.

Johmz
8 - Asteroid

Thanks binuacs. its a big help.

HomesickSurfer
12 - Quasar

Hi @Johmz 

 

Perhaps not as slick as @binuacs solution 😎, this may be of interest...but assumes only 2 each of product and sort

 

Capture.PNG

Labels