I need to perform a quite simple task (or at least it was simple on ArcGIS):

I have two numeric fields called c0g1 and c0g2, and want to add them into a new field named TOTAL.

Must use the Advanced calculator because I need to batch the process. I simply do not know what to type in the Formula field (value =). Tried many things but nothing works... enter image description here

1 Answer 1


Your task can be done in the following way:

If you want to access an existing attribute, that’s possible using <attribute_name>. The feature geometry can be accessed using $geom.

I recommend you to check this article https://anitagraser.com/2013/04/20/advanced-python-field-calculator/

enter image description here

  • 1
    It works! Thank you very much
    – Gonzalo
    Commented Aug 21, 2020 at 17:35

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.