How do I calculate a statistic on blocks of data?

To calculate a statistic on blocks of data (ex: mean of every 5 rows) use the following formula:

cell(index() * n + offset, ocol) = mean([index() * (n-1):index() * (n-1) + (n-1), icol: icol])

where n = the number of rows in the block, the offset is the number of rows down where the final result will be stored, ocol is the output column number and icol is the input column number.

Scroll to Top