Moving Aggregation

Hi, I am trying to calculate moving backward aggregation for a 4 window length.

Week Original Column Aggregation
2022-W46 21781.543464000002 ?
2022-W47 22286.755323999998 ?
2022-W48 25350.899432 ?
2022-W49 23805.777280000002 93224.9755

You can see that when 4 is the window it takes current row and 3 previous rows. I want 4 previous row excluding current row. How to do so?

Hello @nidhichirania,

first use Lag Column node with both Lag and Lag interval values 1 to shift Original Column values down by one. Then you can use Moving Aggregation node on newly created column.


1 Like

You can just move the calculated values one row down with the Lag Column node.
Kind regards

1 Like

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