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](https://us1.discourse-cdn.com/flex016/uploads/coda1/original/2X/6/6793ae9c477b41bb1dec69e4b2b9602a5f1de33e.png)
![image](https://us1.discourse-cdn.com/flex016/uploads/coda1/original/2X/8/833d8fb959ad36bd70e1d5d6c1010bd40186794f.png)
Hi @Joseph_Wood,
welcome to Coda Community ![:handshake: :handshake:](https://emoji.discourse-cdn.com/apple/handshake.png?v=9)
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