Combining multiple filters with operators

I would like to combine multiple filters with operators, for example AND or OR. Is this currently possible in the SQL query builder? Wasn’t able to find a solution on the web (here, Metabase documentation etc.)…

Hi, not sure if that is exactly what you have in mind but the “optional filters” solved that for me.

When you set your variables in square brackets you may or may not use the filter for your question or dashboard. Combining several optional filters should work like an OR function.

One of my questions looks like that:

AND {{date}}
[[AND client_name = {{Client}}]]
[[AND project_name = {{Project}}]]

The date is mandatory, but client and project do not have to be filled to run the query.

Does that help?
To be honest I haven´t tried using filters with OR fuction yet as this solves my requirements, but am happy to give it a go :slight_smile:
Cheers, Eva

1 Like

A first stab at implementation is in this PR: https://github.com/metabase/metabase/pull/6327

You can vote for it - and see design in this issue: