Calculate moving average

Hi,

I have the following list of values that differ between 45 and 55.
I would like to add another column containing the moving average of the values.
But I am somehow lost in implementation. Do you have any idea of how to implement this?

If a moving average is not possible, calculating the average would be nice.

grafik

Hi There!

I created an example with a portion of the data from your screenshot - take a look here:

https://public.getgrist.com/4pHj4AuDtDuw/Community-742-Calculating-Moving-Average/p/m/fork

For the rolling average, the formula currently takes the average from the last 7 calendar days. You can adjust that as you’d like.

There’s also an overall average in the table on the left. This is a summary table where I added the average. To add a summary table, click the green ‘Add New’ button > Select Widget = Table > Select Data = Table where your data is > click green summation button > Add to Page. This will add the Count and Values columns you see on mine. The value in the Values column is a sum of all of the values in the data table. To get the average, divide this number by the count. It will update as you add more values to your data table.

Please note that beyond 100 rows it will get increasingly slower. One of our developers tested this and had to wait ~10 seconds when adding a new date past 500 rows.

Hope this helps!