AND Date Filter

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). 

8b84fb61-861c-473a-a653-2ff97a9ec70d.png
Solved Solved
1 2 742
1 ACCEPTED 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

View solution in original post

2 REPLIES 2

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!

Top Labels in this Space
Top Solution Authors