Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to concatenate fields in field calculator of QGIS? (e.g. hectares + ' ha')

share|improve this question
up vote 16 down vote accepted

In recent QGIS versions (>= 2.6), + works for string concatenation

tostring(hectares) + ' ha'

Previously, the only concatenation operator was: ||

tostring(hectares) || ' ha'
share|improve this answer

Right-Click on the layer -> Properties -> Labels Then you can use the following function "concat(string1, string2,... ) : enter image description here

I hope it will be usefull.

share|improve this answer
You can also concatenate directly with "field1" || "field2". – SAnderka Jan 6 '14 at 8:52
Thanks to both of you. Works! – CARTOS Jan 6 '14 at 9:05
With || you can use all kinds of columns. Using concat(), you can only use strings. – Alexandre Neto Jan 6 '14 at 10:04
I usually prefer at least a blank as separator: "field1" || ' ' || "field2". Splitting the label in two lines is also possible by defining a line separator like /n. – AndreJ Jan 6 '14 at 10:44

You can also append text or put spaces between using alternate quotations:

 "Streetnum" || ' ' || "Streetname"
share|improve this answer

You can use tostring() to concat number fields Ex hectares || ' ha' || tostring(id)

share|improve this answer

Yes! Using the field calculator, the syntax is: FIELDNAME || FIELDNAME

EDIT: This works on string fields or string-integer combinations. With Integers, it will just perform the math and add the fields together.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.