Create Rows Based on Columns

Hi all, hope you’re doing well,

I recently started with Knime and I’m trying to come up with a way to create rows based on columns.

I have a few columns to the left that have the characteristics of say an individual, and a set of columns (weeks) to the right identifying the value of each individual in each week. I want to rearrange the data so that I’ll have only one column with the name “Period” that has the week ID in each row, and a second column that has the value of each week. It is basically as if I where to, in Excel, transpose the data of the “week columns”, but repeating it for each individual. Table 1 would be my table before, and Table 2 my table after.

I actually created a VBA macro that does this, but it has its limitations in terms of data size and I think Knime could be of great help.

Anyone knows how I could approach this?

Kind regards!

Table%201

Table%202

Look at Unpivot Node.

1 Like

That’s perfect, thanks!

1 Like

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