How add new column side by side

How to add a new column side by side in KNIME? Like If we create a new column by any aggregation method or any calculation method, the new column will add at the end. How can we create a new column beside the column which we used as an aggregated column?

As far as I know, this is not possible.
However, you can use the Table Manipulation or Column Resorter nodes to alter the column order.

3 Likes

Hi @Bijal

I might be missing the point so Iâ€™m wondering if it wouldnâ€™t help to provide and example to better understand what you want to achieve. Could you please provide a simple example here with a table with columns and then the result with the â€śadded columnâ€ť containing the â€śaggregated valuesâ€ť ? It would help a lot.

Thanks & regards,

Ael

Hi @aworker,
For example, I have a column A, B, C, D, E. If I add a new column X( Suppose X new column is created with the help of column A, B. suppose a new column created by column A + Column B).
By doing this newly created column will be added at the end like this A, B, C, D, X

But I need the order like this-> A, B, X, C, D

Suppose again I am creating a new column Y(Y = Column D + E) then Column Y will be added at the end.
I need a column order as this: A, B, X, C, D, Y( Newly created column should be beside the depended column not at the end. I need columns in this order.)

Hi @Bijal

Thanks for your quick answer with explanations. There is a specific node to achieve column aggregation:

One can choose what columns to aggregate in several different ways. Then, one needs to use the Column Resorter node:

These two nodes should do the trick (as already mentioned by @elsamuel). You would need to know what is the final order of your columns in advance to set it as you want it to be, i.e. A B X C D Y, as in your example.

Would this be a good enough solution to your problem ?

Hope this helps.

Best

Ael

1 Like

Yes, Thanks a lot! @aworker @elsamuel

3 Likes

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