Column to row for selected columns

Hi,

I’m trying to transform a table. It starts off with a key column and then three sets of columns. Each set contains an Import column and a Value column.

I’d like to transform this table so that there is only one Import and Value column, as per the attached images. Is this possible in KNIME?

image

Hey there,

it is definitely possible and there will be many different ways to get to that result.

I’ve chose to Unpivot the dataset, then to group into Type Import or Type value and then to Pivot again:

I just used one of your rows (do not enjoy typing data manually a lot…)

Workflow:
unpivotexample.knwf (78.4 KB)

3 Likes

Martins Solution is already brilliant, but as he said there are many ways to get the result. Mine is the following:

2 Likes