Filter string based on multiple contains

Hey,

I’m currently building a explore which contains a concatenated string as a key. I would like to be able to filter based on this string where I have 2-4 unique substrings that it must contain. This would equate to an AND contains while I can only seem to make OR contains filters.

The sql equivalent of what I was to achieve looks a little like this:

WHERE (key_string LIKE ‘SUBSTRING_1’ AND key_String LIKE ‘SUBSTRING_2’)

1 2 798
2 REPLIES 2

I would also like to know. All I can think is use a regex instead of using contains substring and then in the regex to use something like

"match1|match2|match3"

my regex isn't great but something like that.

Hey @mganalyst and @timogoosen !

I am not sure if you tried to use the custom expression on the filter side.
There is a function called "contains" that can be used. And the AND/OR conditions can be used on your desire there. That's why I asked if you considered using it.
Here is an example:

dsimeonova_0-1710153254827.png

Here is the SQL behind:

dsimeonova_1-1710153309438.png

Hope this helps! 
Please share if this workaround was proper solution 🙂

 

Top Labels in this Space
Top Solution Authors