Hello!
I am using Looker to find our historical sales quantities for certain SKUs over a range of time periods.
The recent date ranges (last week, last 4 weeks etc.) are easy!
I’m struggling to work out how to filter based on a relative date range from before today.
For instance, see below, I’m trying to find the # of sales for 28 days from this time last year.
(Between 365 days and 393 days ago). I seem to be restricted to OR conditions… no AND.
Note, Items Order Date is the only applicable date filter.
Could someone please help me understand how I can filter by a range such as the above?
Don’t think I have full developer access… I can write a custom filter using LookerML! (as per below).
Solved! Go to Solution.
For this exact query (393 days ago to 365 days ago), it would probably be easiest to just use matches (advanced) and have the value be: 393 days ago for 28 days
Here’s documentation on how to structure filter expressions for matches (advanced) https://docs.looker.com/reference/filter-expressions#date_and_time
For this exact query (393 days ago to 365 days ago), it would probably be easiest to just use matches (advanced) and have the value be: 393 days ago for 28 days
Here’s documentation on how to structure filter expressions for matches (advanced) https://docs.looker.com/reference/filter-expressions#date_and_time
Thank you, Ben!