Filter by two dates, using and rather than or?

I’m trying to setup a filter for some data, that has two dates, date1 needs to be on or before the end of this current week. date2 needs to be on or after the start of this week, and this needs to be an AND not an OR filter.

Anyone got any pointers on how to set this up, currently can’t seem to even work out how to apply the filters as an AND in the report UI, let alone workout how to dynamically set the start and end dates?

Thank!

Hi @Gareth_Jeanne,

There’re 2 parts in your question, I’ll try to answer them one by one

  1. when using multiple filters, they’re always combined as “AND” operators. For example:
  • Filter 1: before ‘2020-11-01’
  • Filter 2: after ‘2020-10-01’

This will generate this kind of SQL WHERE x < '2020-11-01' AND x > '2020-10-01'

  1. If I correctly understand the logic of the “date1” and “date2” filters that you mentioned, I think you only need to use 1 filter which is “matches: this week”.

Please refer to this documentation for more details

Let me know if my answers helps with your case