Place rows from a table next to each other

Hi @ all,

this is probably a pretty simple problem, but since hours I am not able to find a solution.
I have a table which looks like following example:

The number of rows with the same ID and country can vary.

And based on country and ID, I want to bring the rows next to each other like this:

I already tried some loop and joiner combinations but so far I could not find a satisfactory solution maybe someone here can help me.

Thank you

Hi @IlariaL

Could you please post your table as a text file (for instance in csv format) ?
It would help us a lot to find a possible solution.

Thanks & regards,

1 Like

Hi @IlariaL

See attached workflow for an option to do it.

group_cols_country_id.knwf (25.6 KB)

@aworker I re-created the content of the table in my WF if you want to have a go at it :wink:


Hi @ArjenEX

I’m really impressed :smiley: :+1: !

Kudos and hats off

1 Like

That’s definitely better then my first group loop column append combination idea

1 Like

Hi and thank you all,

I am afraid that I forgot to mention that the column names should always stay the same with sequential numbering
KNIME example3.xlsx (3.4 KB)

Is that maybe possible by a variable?

Thanks to your help I am a little closer to the solution.
I can now concatenate the individual columns based on ID and country, when I split these columns I get the same name with the array number.

Now I just need to automatically resort the columns based on the array number like this:

In the attached example I still did this manually.
group_cols_country_id_resort.knwf (16.0 KB)

Does anyone have an idea?


Attached is a way of doing it. Perhaps can be done quicker, but it gets the job done through a string list pased as flow variable to the column resorter.

WF: group_cols_country_id_resort_update.knwf (59.8 KB)


Hi @ArjenEX

thanks a lot. This is exactly what I was searching for :slight_smile:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.