I have an issue withe the field calculator. It is impossible for me to multiplicate 2 columns (area * KZ). The result is always "0". I used the formula area * KZ....is this the right formula? LINK to shape file Here the steps I did:

  1. Using the "advanced python field calculator" to replace the strings "A"into 1, "B" into 2, "C" into 3 and so on
  2. Using the field calculator (processing plugin) with the formula KZ * area without success

screenshot field calculator

  • 1
    There is no .dbf in your zipfile, so there is no attributes linked with your shapefile – Below the Radar Feb 27 '14 at 15:35
  • Try now again, please. – Pimpel Feb 27 '14 at 15:43
  • The .prj file claims to be WGS84, but the extent is something in meters. – AndreJ Feb 27 '14 at 15:49
  • Is this aproblem for the calculator? – Pimpel Feb 27 '14 at 15:58
  • I tryed with the processor Field Calculator and it worked. 'area' * 'KZ' – Below the Radar Feb 27 '14 at 17:20

Quote your fields like this:

'area' * 'KZ'

Please check if your columns are of type integer or real.

In many cases they are of type string, which requires to change the format using toint() or toreal() functions in field calculator.

  • Sorry, I sent you an old file with a string type. I also tried it (processing - field calculator) with a real type...without success. – Pimpel Feb 27 '14 at 15:57

I tryed to do what you want with your shapefile in QGIS

  1. I created a new real (float) field (length: 20 precision: 10)
  2. I used the Field Calculator with this command: "area" * "KZ"


enter image description here

  • I tried it withe the "processing" field calculator, because I want to use it later in a model. But it doesnt work. – Pimpel Feb 27 '14 at 15:53
  • 1
    Please edit your question to enumerate all steps you are doing in details – Below the Radar Feb 27 '14 at 15:57

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.