Filter "in between" 2 dates with 2 filters in a question

Hi,

I'm currently using a dashboard with 2 simple date filters that represent the start and end of date filtering of all the queries of my dhasboard that are actually SQL request (not questions).
In my queries I do something like "where record_date between filter1 and filter2"

Is there a way to use these 2 dates for a question (and not a SQL Query)? Because if in my dashboard i link the 2 filters on my date column of my question, obviously the filters are run like "where record_date=filter1 and record_date=filter2", not "between" :frowning:

Thanks :slight_smile:

Hi @Mor0xx
Why not use a single filter with Date Range (or All Options)?
https://www.metabase.com/docs/latest/users-guide/08-dashboard-filters.html

Hello Flamber,

As I said we're using 2 simple dates because few queries force us to use them. Indeed with a Date Range (All option), it would fix the problem

Regards,

@Mor0xx But you are asking if you can use two filters on GUI questions similar to SQL questions, the answer is no, since you don't have a same control in GUI questions, so it expects you to use a single filter with range instead.
Similar, you can create Field Filters in SQL questions (in most cases), which allows you to use a single filter on the dashboard with a range:
https://www.metabase.com/learn/sql-questions/field-filters

Flamber,

Isn't there a way to create a custom filter that uses variables eventually?

I've tried to use a question on a saved question that uses filters, and unfortunatly these filters are not usable in the question :frowning:

Thanks for your replies anyway

@Mor0xx You cannot currently parse parameters to nested questions.

If you are using SQL questions, then you can use simple variables or Field Filters:
https://www.metabase.com/learn/sql-questions/sql-variables.html
https://www.metabase.com/learn/sql-questions/field-filters.html

If you are using GUI questions, then everything is done automatically for you and you just connect the dashboard filters to the columns returned in the question.

@Mor0xx could be a solution: Date Field Filters - #7 by sam1