How do I calculate a moving average / rolling mean?

There are two main possibilities to calculate rolling mean:

1. The Smoothing analysis

Add “Moving average” as a calculation and set the length.

2. Formula

You can use the formula:

Mean(series, window)


Mean(spx, yearlength())
  • This will calculate a one year rolling mean for the S&P 500.