add the following 20 values (in the following 20 rows) within one column

Hi,

I want to consider only one column. For each row I want the sum of the following 20 rows in order to compute a sum or a moving average.

Within the JavaSnippet I can only access the content of the current row not the following rows (or similar).

Do you have an idea how to achive it?

 

You can do this with a Java snippet node using a global variable to keep track of the cumulative sum for the last 20 values.

Or, much more easily, you can use the Moving Aggregation and Moving Average nodes part of the Time Series group.

Cheers,
Marco.

Thanks, the Moving Aggregation knode is exactly what I want.