Hello,
though I don’t fully understand, what you are really looking for, you may want to take a look into the following sample file: MovingAverage.ods, which uses formula:
=AVERAGE(OFFSET(B2;MATCH(E1-6;A2:A9999;0)-1;0;7;1))
in cell E3
to calculate the moving average of the last 7
values based on date given in cell E1
.
Note(s):
- Column
C
is only for checking purposes, it is not required for the formula to work
- Line Moving Average in chart does not show column
C
but uses chart trend line functionality
- If you want the Chart to show the average values you need to use column
C
as a data column for the chart.
Hope that gives you an idea, how it could be done.