[solved] OR conditions

Is there a way to do OR conditions in filters right now? Also how can we do more complicated filter sets without diving into raw SQL?

Can you provide an example SQL query that you are trying to reproduce?

Something along the lines of SELECT count(1) FROM table WHERE (col1 = A AND col2 = B) OR (col1 = B AND col2 = A)

That was a very simple example but thats the gist of what I want to achieve.

Given that these things can be tweaked at the datasource or I’ve been getting around by adding some views.

Cheers

Hi,
I resurect this topic, I still do not know how to do logical condition on filter in a question. something like
select * from table where field1=‘string’ or field2=‘string’ or field3=‘string2’.

I would like to know how to do this too. I know you can switch to sql view to do this but seems like a common enough thing that it would be useful to have in the visual query editor? I showed metabase to someone else and it was pretty much the first thing they asked how to do.

This issue is being tracked in github if you’d like to add your support there:

So, what does that mean? That it is fixed in the source code, just not available in a release yet? How do I “add support” to a code versioning management system?

So, what does that mean? That it is fixed in the source code, just not available in a release yet? How do I “add support” to a code versioning management system?

In general, that just means we’re aware of this request and it has a corresponding issue. In this specific case, we’ve finished developing this feature and it’ll be available in the upcoming 0.35 release.

As far as “adding support,” what we mean is that we encourage people to add a “thumbs up” reaction to the initial description of an issue in GitHub to show their support for it. You can also always add a comment with additional context about why you’d want that feature or fix, with any relevant specifics.

Hope that helps,
Maz

Thanks for taking time to explain! Looking forward to the next rev.

Just an FYI that we released version 0.35 earlier this week: https://www.metabase.com/blog/0.35/

1 Like