Can I use DashBoard-Filters on written SQL?


I am playing around with MetaBase and Clickhouse.
In the clickhouse-DB I have some colums as arrays. I had great experience building dashboards via auto-generated statements, but when I write own SQL the dashboard-filters do not work.

Is there a trick to make the filter visible/choseable on own sqls, when I edit the dashborad-filters?

Best Regards


Hi Alexander - I believe you are looking for the "parameters" feature of Metabase. In your custom SQL, you'll want to set up parameters in your "where" statement. And then from a dashboard, you can point your filters at those parameters. There's some documentation here: I've used this feature extensively to good effect. Hope this helps! -J.

@Justin1 Completely correct - here's an article:

Ahhhh ... Ok then ... I will read this article then ... GREAT and THX a lot :slight_smile:

Got it so far ... thank for your quick reaction :slight_smile:


But actually I am searching for a TimeRange-filter (standard of my DashBoard).
Does anybody now if this is possible too?

Like this ?

[[AND parcels.ShipmentCreationDate between {{ShipmentCreationDateFrom}} and {{ShipmentCreationDateTo}}]]


[[AND parcels.ShipmentCreationDate >= {{ShipmentCreationDateFrom}}]]
[[AND parcels.ShipmentCreationDate <= {{ShipmentCreationDateTo}}]]

Last one works and shows me the filters on the question itself - not on the dashboard!
There is already a dashboard-filter bind to some other questions ... here I still get

For single-date-filter it is fine :slight_smile:

@Speey When you use simple Date filter in the question, then you can only select Single Date in the dashboard.

If you use Field Filters, then you have a lot of other options, but then the variable should only be:
[[AND {{ShipmentCreationRange}}]] - and then select Field Filter in the sidebar.

There are limitations with both Field Filters and simple filters (Text, Number, Date), so not everything is possible with both of them - each have their own forces and use-cases.

I like MetaBase :slight_smile:
Solution is already there : image

1 Like