6

I'm using QGIS and I want to create a rule to filter a dataset by size and by name (all areas over 80000 squarekilometers that begin with an A)

This is the expression I built:

"areakm2" > 80000 AND left("NAME", 1="A")

I always get an error message stating :

Field 'A' not found!

Why does QGIS not recognize that A is regarding the first letter of the selected string, how would I need to change my expression?

1 Answer 1

8

In QGIS text strings are enclosed in single quotes (') while double quotes (") are for field names, so your expression should be:

"areakm2" > 80000 AND left("NAME", 1)='A'
1

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.