Shift Row Up

Hello Dear All,
I need to shift the rows up but don’t know how to do. To shift down we have Lag column node but is there anything to shift the rows up?
thanks in advance =)

Hello @kubra_08
The low code node for this task is Moving Aggregation. This is an underrated node from my opinion, as it can deliver many different functions.

It can also perform ‘lag function’ with ‘Backward’ and ‘First’ Aggregation options.

The alternative way to proceed would be ‘Column Expressions’ node, but will require some coding.



Hi gonhaddock,
it worked perfectly. Thanks a lot.
For the others who will read this post, aggregation has to be “Last”, as gonhaddock showed in the screenshot, otherwise it does not workout.

1 Like

Hi @kubra_08
Just for the records and adding some information: as mentioned flipping the functionality it can deliver Lag function Lag(-1), besides the ShiftUp(+1)

You can as well Lag() or ShiftUp() more than one row in just one step, by increasing the ‘Window length’. In your use case for example, a ‘Window length’ == 3 would return a ShiftUp(+2)


1 Like

I recently saw @HansS idea adding an index column sort descending do a normal lag and sort ascending again. Should also do the trick


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