How to make data in rows as columns?

Hi Everyone,

I am new to KNIME and I am trying to figure out how to convert these data in rows [Action] as columns? I want to show them as columns with the total costs.

This is typically done with the Transpose or Pivot Node. Transpose flips rows to columns, Pivot (and UnPivot) allows for conditionally transposing the data using aggregation methods.

4 Likes

This is the data I have currently:

…and I want it to be like this:

I tried transpose and pivot and they don’t work the way I want it to be

Hello @ClaudsQuito,

you don’t need Transpose node. Pivoting will do it all. Grouping columns are Project Number, Project Name, Location Description and all other column that have same values across multiple rows. Pivoting column is Classification and Cost is your aggregation column where you can use First aggregation.

Welcome to KNIME Community!

Br,
Ivan

3 Likes

Why it does not allow me to execute?

image

I’m done configuring it like your instruction, now there’s no option for me to execute it. Maybe I’m missing something. :frowning:

Hi @ClaudsQuito ,
Could you please share a snapshot of the pivoting node’s configuration window for all three tabs, namely the grouping window, pivoting window, and aggregation window or the workflow, if your data is not confidential?

Thanks,
Sanket

1 Like




here u go :slight_smile:

Hi @ClaudsQuito ,
Can you add column COST in the Manual aggregation window to make the aggregation selection FIRST, as @ipazin mentioned? Keep only the “Classification” column in the pivot tab. The rest looks good.

Thanks,
Sanket

3 Likes

ohhh… it worked :slight_smile: thank you for clarifying. I misunderstood @ipazin 's comment… thank you all!

2 Likes

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