Urgent! How to turn the data format by using unpivoting or other functions?

Hi Everyone, I would like to know that Can I use unpivoting to perform this result?

Here is the original data format.
I want to combine all order code, amount and cost to three columns respectively.

Here is the expected result.
image

Please HELP!!! Many Thanks!!!

Knime.xlsx (9.5 KB)

hi @HKuser,

I uploaded a workflow to my public hub…

In my solution I go for a unpivot -> pivot combination.
In the table creator you have to define how much combinations of amount-order-cost exist. In your example there are 3.

Hope that helps, regards, Tommy

4 Likes

how can i download your workflow?

Hi @HKuser

A little bit different approach, but also using the Unpivot node. unpivot_and_rank.knwf (31.4 KB)
Knipsel
gr Hans

6 Likes

drag & drop the yellow icon on the upper right of the KNIME hub page to your KNIME workspace.
@HansS solution is great. It gets rid of the loop.

2 Likes

Hello @HKuser,

here is my solution using 3 times Create Collection Column node follwed by Ungroup node.
unpivot_and_rank_ipazin.knwf (27.1 KB)

Br,
Ivan

7 Likes

Wouldn’t have thought about that way. Very nice ipazin. Thanks for sharing! BR

1 Like

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