For an easy fix as long as the input table remains the same, when you load it into KNIME, don’t promote any of the rows into headers, so you’re left with ‘column1’ then ‘column2’ etc.
Create a separate table, and input the values that you need
e.g.
You can then concatenate the 2 together and filter out where ‘column3’ is missing
This will only help if months are static in number. I need something where I don’t have to specifically create a table and concatenate it. I need to do something dynamic here. Any lead on it?
but you are showing screenshots from Excel. The question is how data is organized inside KNIME? Are those values column headers or not? Can you share input sample file?
Tick the ‘Replace RowID’ and nothing else selected
Tick ‘Create new column’ and name it ‘Rows’ and nothing else selected
Column filter to leave Row0 only
Create table
Concatenate data
Repeat step 2
Repeat step 3
Left Outer Join on column ‘Rows’
Create rule
Column filter removing ‘Rows’ and ‘Row0 (#1)’
Repeat step 2
Transpose
And your output will be this
And it would change if the months changed, you wouldn’t need to do anything else
You can obviously add a column rename node at the end to rename them if you please, but I guess you wouldn’t need to if you then output to Excel not including the column names
Thankyou it worked. But I have found another interesting way of doing it which is pretty simple. As in my case the specific row is always the first one. So just transpose it, pick the first column which will reflect the first row. Use the MISSING row node and implement previous value logic. Then transpose the row it will do the trick. It did for me. Thank you though for putting such effort!
Unpivoting it will be much more effort. As its the first row not the header. So we have to always make it a header, it cant be directly converted into header as their are missing value which is the problem. As header cannot be null. It is doable but much more effort