How do I show the last 7 days in a formula?

I’m using a formula to show the last 7 days of my step count. But I’m not sure how to filter the last 7 days. I’m just going to have a sentence that says, “The average step count for the last 7 days:” I’m not sure if I use .filter or date or what.

I’m sure it’s simple, but for some reason I can’t get my mind to figure it out. Thanks for any help!

Why use formulas to do that ?

How about use interactive is fit for you ?

Build Interactive filter on the date type of column.

image

image

Hi @Joseph_Wood,
welcome to Coda Community :handshake:

If I correctly got your point, the formula could be something like this:
[YourTable].Filter([DateColumn]>= Today()-Days(7) && [DateColumn]<= Today()).[Step].Average()

However, if you could share your document - or a sample of it - (through “share” link on top-right) it would be easier to figure out a solution.

I hope it helps.
Cheers!

1 Like

This did it! It’s exactly what I was trying to do! Thanks!

1 Like