I'm trying to do what seems like a very simple operation (It's SUPER easy in ArcMap...). I'm kind of a novice with QGIS, so it's probably something really simple that I'm doing incorrectly. The release is 2.18.12. Basically, I want to create concatenated labels with values from three separate fields, separated in the text by a comma and a space. The fields I'm trying to concatenate are numeric and have no null values (unless zero is considered null). Here is my expression:

enter image description here

Here is the error summary:

enter image description here

This is ridiculously easy in ArcMap using a JavaScript expression. Heeeeelp!


You're mixing two functions. You could use either:

TOWNSHIP || ',' || RANGE || ',' || ISP_SECTIO


concat( TOWNSHIP, ',', RANGE, ',', ISP_SECTIO )

The concat version is a bit safer, since it will automatically treat NULL values like an empty string.

  • Note use of "concat", not "concatenate" (which is a different function)
  • Thanks! For some reason, the coalesce function only returns one value per feature. The first format that you suggested did the trick, though. – Mike S. Jan 23 '18 at 3:22
  • Ah sorry, I meant concat – ndawson Jan 23 '18 at 8:04

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.