Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

share|improve this question

5 Answers 5

up vote 15 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! –  Salliva2000 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.