community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Group By and Concatenate Rows with Nulls

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.

 

Alteryx
Alteryx

Hi @chanmar 

 

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.

 

 

Highlighted
Asteroid

That is genius, thank you!!

Labels