Multiple columns with different type / years to single column flatile

Hi,

Hope all is well.

This is probably an easy question for all experienced in KNIME - I’ve got a dataset where I want to have date (month+year), type and value in single columns in my flatfile, as of now I got Net sales FY21, Net sales FY20, Gross Profit FY21 and Gross profit FY20 in different columns so what I’m trying to figure out is how to:

Date: Value Type
FY21 200 Net sales
FY21 150 Gross profit
FY20 190 Net sales
FY20 130 Gross proft

Attached the dataset → (sheet “Data - as of now” is my data as is and sheet “Needed output” is the what I’m trying to achieve)
Data - Example.xlsx (14.2 KB)

As I’m a newbie I would really appreciate if someone had the time to upload an example of a workflow -so I can lean from your experience.

@elsamuel @aevf

Have a nice day /Fredrik

Hi @fredrikt,

That’s possible using the Unpivoting node.

Here is a workflow to demonstrate how to use this node to get your desired output:
41481.knwf (33.0 KB)

:blush:

5 Likes

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