Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I got a data like that :
Week Quantity
1 1000
2 1500
3 4000
4 6000
5 2000
6 800
7 9000
8 34000
9 450
10 100
I would like calculate for each week the moving average of order 3
Then, I would get
Week Quantity
1 1000
2 1500 (1000+1500+4000)/3
3 4000 (1500+4000+6000)/3
4 6000 (4000+6000+2000)/3 ect ect
5 2000
6 800
7 9000
8 34000
9 450
10 100
I tried to use function rangeavg but it never takes me previous value or good values
Thanks in advance
Hi Fred,
Try using RangeAvg() in combination with Above(). The second parameter of Above() is the offset. You should use offset 1 to start the calculation with the next row after the current row.
I usually see moving averages calculated starting with the current value and going N values back. This is the first time when I see a moving average that includes both the past and the future numbers - and this is exactly what the Offset parameter is for.
Good luck,