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.
SOLVED

Group By and Concatenate Rows with Nulls

mcha54
8 - Asteroid

Hi there, I am trying to group some rows together. Some fields can be null/empty. ID is the unique identifier and not necessarily numeric. If a field is populated and has the same ID, they should be concatenated. There can be 20+ fields. Example workflow attached.

 

Input:

IDField1Field2Field3Field4Field5Field6Field7Field8
11Orange  137500  Type1
12BlackBRANDSPORT137500 NType2
21Orange  137500  Type1
21BlackBRANDSPORT137500 NType1

 

Expected Output:

IDField1Field2Field3Field4Field5Field6Field7Field8
11,2Orange,BlackBRANDSPORT137500 NType1,Type2
21Orange,BlackBRANDSPORT137500 NType1

 

 

I seem to be able to group and concatenate them together, but then the cells have repeated values.

Any suggestions on this? I think I can strip out the repeated values via regex for each field, but if there's another approach that doesn't get repeated values that would be better.

 

2 REPLIES 2
BrandonB
Alteryx
Alteryx

Hi @mcha54 

 

I think the attached worfklow should accomplish what you are looking to do. I used a transpose, text to columns (split to rows), unique, and a crosstab.

 

 

mcha54
8 - Asteroid

That is genius, thank you!!

Labels