Move entire column up by 1

Does anyone know how I can move an entire column up by 1 in Knime? Thanks

Assuming that you’re talking about rows, you can use a Moving Aggregator node.

3 Likes

Column Expression is another possibility:

1 Like

Thanks for your help. Howerver I do not have column expressions. Only expressions and it is different from yours.

Hi @maya29

If you are able to install extensions, the Column Expressions node can be installed by dragging this from the hub:

In the (“new”) Expression node, it can be achieved similarly:

with

$["column2",1]

1 Like

I am unable to enter a -1 for the Window length

Hello @maya29

Alternatively as @elsamuel suggested; you can use ‘Moving Aggregation’ as a low code solution for shifting rows up and down, customizing shifting range. Take a look into this topic:

BR

1 Like

Use 2 for window length

1 Like

I like that @elsamuel and @gonhaddock. I had never thought about using Moving Aggregator as a (more powerful) lag column node! Don’t know why, but just never thought about it.

For the purposes of shifting the one column “in situ”, it’s worth pointing out (using the screenshot from @gonhaddock 's post), also ticking “Remove aggregation columns” and then setting “Column naming” to “Keep original name(s)”

1 Like

This worked great and helped me with what I wanted to achieve. Thanks alot! I am just getting back into using KNIME again. I initially started in 2019 but haven`t been using it since then. I am trying to use it again now. Thanks again!

for some reason that pushes it too far ahead. as in down. I wanted to move it up. And takbb suggestion helped me do just that. But thanks again!