I have been adding points to a vector layer and I want to define their value in a specific column. When I try to edit the values, that are in decimal numbers, it only allows me to type integers.

How do I edit points in my attribute table in decimal numbers?

This is before(Z_COORDS) and after(ZCOORD) I tried to edit the column. enter image description here

  • 1
    What is the problematic field definition?
    – JGH
    Jun 7, 2017 at 14:28
  • Field definition? Sorry, I am new to QGIS.
    – Gisnoob123
    Jun 7, 2017 at 14:31
  • @JGH open up the layer properties of the mower2shapefile layer, check the FIELDS section, and let us know what the data type of the ZCOORD field is... it might be a SMALLINT, which doesn't store decimals... Jun 7, 2017 at 14:33
  • @JGH Under "Type" it says: qlonglong. And type name: Integer64.
    – Gisnoob123
    Jun 7, 2017 at 14:36
  • I selected New Field to add another column. However, when I click 'Type', I do not see the 'Decimal Number (real)' option. I attached a screenshot![enter image description here](i.sstatic.net/AlO7j.png) I have version 3.12.2 and my professor has version 3.12.1, so it appears for him but not me. Also as you can see there is no 'Length' or 'Precision' options to fill in. I do not know what to do. What is the best thing to select instead? Or should I download version 3.1.12 instead and continue working using that version of QGIS? Apr 22, 2020 at 11:04

2 Answers 2


The field you are editing must accept decimals. You can add a new field of type real. The length is the total number of numbers and the precision is the number of numbers after the decimal. So length 2 precision 1 will let you save 0.0, 9.9 but not 0.01 nor 10

enter image description here

  • The problem is that the field did accept decimals until i edited it. But now I haven't been able to recreate my problem, your solution works!
    – Gisnoob123
    Jun 8, 2017 at 6:21

you can modify the label decimal numbers as shown in the figure enter image description here

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.