merge multiple columns in one column

Hi @MohHabib , thank you for the clarification.

The attached workflow gives one possible approach. As it turned out I didn’t use pivot/unpivot but instead pulled out the required groups of columns, performed the aggregation on the amounts and then joined reassembled each group of rows using concatenation. I think it gives the result, although I couldn’t determine if you had a particular sort order for the final result. Hopefully it gives something to work with.

merge tabulated columns and aggregate.knwf (45.1 KB)

My solution is slightly more “manual” than I would like. I prefer to do something a little more generic (e.g. if you had an extra bracket amount, then you’d have to manually add another branch), Possibly we could add a loop instead (maybe somebody will!) but hopefully this will be good enough. There may be better ways that somebody can think of!

and Welcome to the KNIME community! :slight_smile:

3 Likes