How to pass a Date Range to a Date Field Filter when using Custom Destination?

Hi everyone,

I am currently working on an interactive dashboard and I’ve encountered an issue with using custom destinations and date filters. Here’s the scenario:

The original query/card I want to click on has a consumption_period column that represents all dates of a month (currently it is computed as DATE_TRUNC(consumption_date, 'month'), but I'm okay with any format that represents the month of the consumption_date field). The visualization is a bar chart, with one bar for each consumption_period.

The destination query has a consumption_date field with a date field filter that supports specific days or date ranges.

I want to set up the custom destination so that when the user clicks on a bar of the original query card in the dashboard, the destination query is filtered to show all dates within the month specified by consumption_period. For example, clicking on the bar for July 2024 should filter the destination query to show all dates in July 2024. As I have it now, it filters the destination query to just the first day of the month, i.e., it filters to consumption_date = July 1, 2024 (since it is the result of DATE_TRUNC()).

How can I represent a date range in a column that a date field filter can later understand as a date range?
Any suggestions or solutions?

Thanks!

You should be using the GUI to create that question are you able to? Doing a group by month int he GUI should be straightforward and then you can add drill through to the question itself

TonyC, thank you for your answer, but unfortunately not, my query is way too complex to be done with the GUI

Then I don't think that is going to work :confused: what i can suggest for you to create another question but having date granularity so that when they click they get redirected to a new question using that filter so it gets Date granularity