Question

Date filter

  • 14 February 2017
  • 2 replies
  • 129 views

What is the right date filter syntax for: after 2017-02-13 and before today?


2 replies

Userlevel 2

Hi @hans-t,


To do that you will need to combine two separate dimension_group timeframes (any selected will work). This is because you want to combine both conditions (an AND rather than OR in the WHERE clause of your query).


Let’s say we have 2 timeframes based on the same date field: order created date and order created time. The first timeframe needs to be set to is on or after 2017-02-13 or matches (advanced) after 2017-02-13. The second timeframe needs to be set to matches (advanced) before today (as shown below):



Please refer to this doc to see all Looker filter expressions.


Best,

Aleks

Userlevel 5
Badge

@hans-t you could also get the same behavior by using 2017-02-14 to today (note you want to use 02-14 instead of 02-13 in order to get after 02-13).

Reply