Working with QGIS 3.4.1 - Madeira

I am trying to perform a simple Filter, but when I include more than 31 values of a given field I get Zero returns.

Is there a limit to the number of statements that can be used in the filter? I am using the following expression: "Field_name" = 'Value1' OR "Field_name" = 'Value2' OR... and so on

  • what software are you using
    – Ian Turton
    Nov 12, 2018 at 15:04
  • QGIS... sorry forgot to mention it.
    – user131678
    Nov 12, 2018 at 15:05
  • 2
    If you filter from the same field try the IN operator : "FIELD_NAME" IN ('Value1' , 'Value2' , 'Value2' , ...)
    – J.R
    Nov 12, 2018 at 15:07
  • 1
    That did seems to work, thanks... do you know if there is a limit to how many 'OR' statements one can use.
    – user131678
    Nov 12, 2018 at 15:14

1 Answer 1


If you filter from the same field try the IN operator:

"FIELD_NAME" IN ('Value1' , 'Value2' , 'Value2' , ...)

It's easier to type and read and I don't think there is really a limit of the number of values (but if you need a lot of value maybe the LIKE or NOT IN operators are what you need)

Your Answer

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

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