Set a time filter to look at the last 7 days or last 30 days

1046
2
08-16-2022 11:27 AM
Status: Open
SaraHedrick1
New Contributor III

I have a dataset that updates on a weekly basis, and I'd like to be able filter for records added within the last seven days or to be able to look for actions that occurred in the last month. Although I can set a filter for a custom time range between two set dates, I'd prefer to not have to manually updated those date ranges every time my dataset updates. 

It could be that this exists already. I'm still learning and there is a good chance I just haven't figured it out. 

2 Comments
Scott_Aulen

@SaraHedrick1 -

Good question. This can actually be accomplished currently using the Advanced Filter tool and Insights built in functions.

 

Example:

If I wanted to show records within the last 7 days I can create a query which includes dates that are greater than today minus 7 days using the DATEADD and NOW functions.

Scott_Aulen_0-1661808942454.png

1. Replace with your date field

2. Replace with your last XX query (hours, days, months)

3. Replace with the corresponding unit ("h", "D", "M")

SaraHedrick1

Scott, 

I tried this and it absolutely worked. Thank you!