I'm new on QGIS, I have shapefile for the whole country and also have for Province down to City/Municipalities, is there any way on attribute table where I can filter using an expression for example:

"PROVNAME" = 'CEBU', but this only for one area.

I tried adding multiple areas, like "PROVNAME" = 'CEBU' 'others' 'others'.

So basically tried that multiples areas, but getting an error:

Parser Error:
syntax error, unexpected STRING, expecting $end

Eval Error:
No root node! Parsing failed? 

Is there anyway I can select multiple areas by expression, so I can extract from a large area shapefile, I'm trying to filter it from country down to province and cities, so I can extract it easily.


From what I understand, what you are looking for is:

"PROVNAME" IN ('CEBU', 'others', 'others')

This will work, but it might not be the best solution if you are trying to select a large number of areas.

  • Very cool, I did not know you could make an expression like this. I learned something new today! – ed.hank Feb 27 '16 at 17:20

You need to use the OR operator. Your expression would be


Without that OR you will get a parsing error ( I tested my string expression without the OR and got the exact same error msg as you )

enter image description here

** Obviously our field names are different, but you want to format your expression like above

Your Answer

