2

In trying to build a simple expression to sum data into clusters I've used the following statement:

sum('MTO heat map_Total','MTO heat map_Grouping')

The value 'MTO heat map_Total' is an integer shown here: Field attribute type

However the expression editor identifies the following error: String value instead of integer

I'm not overly skilled with the program (yet) and I'm sure there is something I'm overlooking. Any thoughts here?

1 Answer 1

2

Single quotes ' are for strings, double " for fields. So you are trying to sum the strings 'MTO heat map_total' and 'MTO heat map grouping'. Change ' to " so QGIS understand you are referring to the fields

1
  • Or just skip any kind of quotes. You can refer to fields either using double quotes "field_name" or just the field's name: field_name. To avoid confusion, however, it can still be good to use double quotes.
    – Babel
    May 15 at 9:43

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.