I would like to select multiple attributes which contains some specific text ("Bus", "Car", and "Motorbike") from the same field ("commodity") using Select by Expression function in QGIS. My version is QGIS 3.24.0

In case I just want to select the attributes of field "commodity" which contains the text "Bus", I use like operator:

 "commodity" like '%Bus%'

However, I also want the rows which contains other words as "motorbike" and "car". Among other things, I am trying the following:

"commodity" like ('%Bus%', '%Motorbike%', '%Car%')

However, it does not work. Any idea of how I should proceed?

1 Answer 1


You need to chain your LIKE expression with the OR operator so your expression become :

"commodity" like '%Bus%' OR "commodity" like '%Motorbike%' OR "commodity" like '%Car%'

(Separating value with comma work for the IN operator but not with like)

  • It works. Thank you!
    – OgeiD
    Sep 22, 2022 at 13:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.