Two conditions be requested in the same text field

I have a text field in a table that needs to be searched for two conditions, for example that the field contains one word and also contains another. It cannot be done through the graphical interface and I must do it in SQL. Can two conditions be requested in the same field?


if I understand your question well, although it's not ideal, you can go into the "show editor" view, and can apply another filter to the same column from there.

But in that case he behaves like an AND and what I need is for him to behave like an OR

LOWER("dbo"."OP_BANDEC"."OBSERV") LIKE '%deposito de efectivo%'

LOWER("dbo"."OP_BANDEC"."OBSERV") LIKE '%sac sepsa%'

Hey there,

you might use Contains

Screenshot 2024-07-08 at 14.23.57

There you can add as many strings as you want:

Screenshot 2024-07-08 at 14.24.44

Hope this helps!

I attach an image of how it looks, notice that it does not give me the option to add more search strings. In your image you can see below that you were able to add several chains, it doesn't give me that opportunity. it only updates the filter by removing the previous one and placing the last one.

I think it does.

Try to "Actualizar filter", and then open the filter again.

You will see that you can add multiple filters.

Moreover, which version of Metabase are you running?

I've tried it and he takes the previous one from me and leaves me the last one, notice when I tell him that it ´es´ he gives me the option but when I say it ´Contiene´, no. When it compares complete strings it does admit it but when it has to do a "like" it does not. My version is 0.49.13.

Later I will install the English version to see if it is the language, because I tried with the data type in the sql database and I can't find the cause either... And what is your version? and if you're using a SQL server database, what's the data type of the field? nchar or nvarchar or....

I have no choice but to write the query, but then I have to give up other options, such as data drilling, which does not support it if the query is made directly in sql

Thanks to everyone, it was enough to click on the text box and type the next criterion and update the filter...

1 Like