I am curious about field calculator and expression builder language in QGIS. For example, $area returns the area of the 'current feature'. Does 'current feature' refer to all features of a shapefile that is loaded in the workspace?

1 Answer 1


The current feature is the one you're doing the calculation for. If you e.g. selected a single feature on the layer and choose to only updated selected features, the area is only calculated for that feature. If you run the calculation for the whole layer, the area is calculated for each feature and attached as an attribute to that feature. Meaning, the value in the column area of feature 5 is the actual area of said feature, and not the area of e.g. feature 23.

Different from that, some expressions, e.g. sum(), calculate something with is not only represented by a single feature.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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