using field calculator in Qgis 1.8.0 to get the area, it shows just right at first but when I save it, the values become Null.

  • From what data is your layer (Shapefile, Spatialite, GPX, Postgis)? Can you edit the geometry?
    – AndreJ
    Commented Apr 8, 2013 at 5:36
  • Its a shape file
    – Pamela
    Commented Apr 8, 2013 at 17:18
  • I have the same problem, I have tried anything. Commented Mar 27, 2015 at 15:40
  • Welcome! Sorry, but your comment does not qualify as an answer and will most probably be deleted. If you have comments to the question I suggest you elaborate your efforts as comments to the question.
    – ragnvald
    Commented Mar 27, 2015 at 16:21

2 Answers 2


What Coordinate system is your shapefile layer in? If you have something in degrees, the area will be computed in square degrees (which does not make sense, and will be a very low value). Note that the project CRS can be different, but has no effect on $area.

If your layer CRS is in metres, try a greater value for width. 99999.99 m² may be too small for the areas. The formatting is only applied after saving, thats why you see the correct result at first.

  • I changed the width for a greater value and it worked :D! thank you very much
    – Pamela
    Commented Apr 8, 2013 at 18:56

just a guess but this is what I did wrong... you need to make the sure the columns properties are set correctly if you are creating a new column in the attribute table

when setting up the column you need to make sure you have the numbers right ie whole numbers or decimal (or text) and width and precision as well

  • Help file hub.qgis.org/wiki/quantum-gis/Calculating_field_values
    – Banger
    Commented Apr 8, 2013 at 8:55
  • I checked the colum properties and they are just fine, but now the all values become zero
    – Pamela
    Commented Apr 8, 2013 at 17:01
  • i already tried creating first a new field with this properties (real numbers, width 7 and precision2) saving those changes and then updating that existing field with $area and it still doesnt work
    – Pamela
    Commented Apr 8, 2013 at 17:11

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.