Concatenate Filters

Is it possible to concatenate filters in Metabase query having variables.
Table abc: has 10 columns 1,2,3,…10
For example:
select * from abc
The above one works but if i have to concatenate col1 and col5 in variable filter so that i can have drop down enables accordingly. is it possilbe ?

Hi @ankitjajoo
I don’t understand the question, can you explain in a different way?
I don’t see how concatenate has anything to do with this. You cannot concatenate Field Filters, since Metabase inserts the SQL.

Thanks for the response here. with the above query in filter i would see col1, col2, col3 based on with the tile would be filtered. I aim to have the filter which would be combination of 2 columns from the table col1 and col5 for example. That’s what i’m referring to here.

Yes, you can do that.
Create a new concatenated column while writing a query and use that column as a filter column.

Something like this:-

select oid, email, concat(oid,email) as ‘oid_email’
from Orders
where 1=1
[[AND concat(oid,email) = {{oid_email}}]]

pretty cool… thanks Tarun, will give this a shot!

1 Like

Happy to help:)
Let me know if you have any questions.

thanks tarun, is there any way of applying this filter as a field filter.