QGIS – Filtering Rows by Letter

expressionfields-attributesfilterqgis

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?

Best Answer

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'
Related Question