What is the formula to find the average of the previous three rows in a table?

Hey everybody,

I’m trying to find the three day Average of my past three nights Oura Sleep Score
This is the Google Sheets formula =(A1+A2+A3)/3

1 Like

hi @Joe_DellaCava , welcome to the community

the question can be responded to in different ways.

I took this angle:
you first select the date values before today

next you take the last three via Slice(-3)

and the last step is the average

this is different compared to any spreadsheet and I believe also more powerful once you understand the basics.

hope it helps,
Cheers, Christiaan

4 Likes

Once one breaks the Excel patterns, Coda becomes amazing!!

1 Like

yep it is and @Joe_DellaCava I thought maybe you want to have a moving average, in that case you can apply the logic below (merci @joost_mineur for the inspiration)

3 Likes

This is great! Thanks Christiaan!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.