How to make the same value appear in two filters

The Scenario

You have two date filters, Created At and Sent At. You want them to always be equal (7, 30, 100 days ago) and they are both necessary for your analysis.

The Solution

Assuming you are working in a Topic, add the following code to every View within that topic:

compound_date:
    sql: |
      (partition_date >= NVL(DATEADD('day', -2, {{ filters.event_date_filter.range_start }}), '1970-01-01')
      AND 
      partition_date < NVL(DATEADD('day', 2, {{ filters.event_date_filter.range_end }}), '2100-01-01'))
      AND
      (h_server_timestamp >= NVL(DATEADD('day', -2, {{ filters.event_date_filter.range_start }}), '1970-01-01')
      AND
      h_server_timestamp < NVL(DATEADD('day', 2, {{ filters.event_date_filter.range_end }}), '2100-01-01'))
    hidden: true

filters:
  event_date_filter:
    type: timestamp

And then in your topic file, add this:
always_where_sql: ${v_event_name.compound_date}

This means that using the event_date_filter filter will cause all dates across the topic to be uniform.

Happy building!