2

I want to update an existing field with the number of values, in a range of preceeding fields. I could do this easily in EXCEL with "=NUMBER ARGUMENTS", but I want to learn this in QGIS.

I want to update the field named "totaal" with the number of 'x' in the preceeding fields. Count the arguments in fields "5 jul" to "12 sep".

enter image description here

asked Nov 11, 2016 at 16:02
4
  • Could you edit your question please and provide an example of what you have and the result you would like? Commented Nov 11, 2016 at 16:07
  • Upload a print screen of your fields. Commented Nov 11, 2016 at 16:15
  • Perhaps this post might help: Summarizing Fields based on content in QGIS? Commented Nov 11, 2016 at 16:16
  • Thanks @Joseph, but I don't know how to work with Python... Commented Nov 11, 2016 at 16:25

1 Answer 1

3

Since you are not comfortable with python, here is the alternative method:

  1. Start edit session, open up table, and use Open Field Calculator tool to field calculate 0 for all features for the total field
  2. For each field you want to evaluate if field value equals 'x', use the Select features using an expression button within the table (e button) and run the selection one field at a time for any that may have 'x' value, e.g. "field1" = 'x'
  3. For each iteration of step 2 run the Field Calculator and increment the total field by total field value + 1 each time (this will apply the increment for only selected features), e.g. "total" + 1
  4. Repeat step 2 and 3 for all other fields that you want to evaluate for 'x'
  5. Stop and save edits
answered Nov 11, 2016 at 16:53
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.