Dashboard "Single Date" Filter - Default Value

Hi,

I was wondering if there is a way to set the dashboard “single date” filter to the current date.

Maybe I could put this in the native query itself to pick current date if no date is selected, however, considering I have many different questions on a dashboard aggregating over that date and/or making various decisions reliant on that date, the amount of places where I would have to annotate the current date would be extremely cumbersome.

I just want the dashboard “single date” filter to be set to the current date so the initial view of the dashboard shows values based on the current date.

Ideally, I would like to be able to select the default value of the dashboard filter to be (curdate() - interval 1 day) (sql language) or yesterday (normal people).

Any support would be greatly appreciated.

Thank you!

Hi @Wasiq
That’s currently not possible, but there are workaround either by using coalesce or Complex Default Value:
https://github.com/metabase/metabase/issues/3156 - upvote by clicking :+1: on the first post

Hi @flamber is there a current plan to see the complex default value visually in the single date filter when its set?

upgrade to the current version, Metabase has been offering this feature for a long time

Hey Luiggi, thanks for the reply - i am using v45.2. Ive set a complex default value for a single date filter within the SQL using optional clauses and the database's "comment" method. When I do this, I still dont see the value populating in the filter. If you can point me in the direction where this release note was created I can modify my solution- Thanks!