1

This question already has an answer here:

I'm trying to create a label that will show the following: MP 23.6 The "23.6" is a double type column in my table, the "MP" is the text I want to add in front of it of the number (milepost).

I am new to QGIS.

enter image description here

marked as duplicate by MrXsquared, nmtoken, Hornbydd, jbchurchill, Evil Genius Jun 25 at 12:13

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2

You are trying to perform an addition between a string and a number. Instead, use the || evaluator which will concatenate both into a string like so:

'MP' || "Milepost"

You could also transform the value of your Milepost field to a string in your expression as in this question/answer.

  • The OP needs a space between MP and the mileage value. – Stu Smith Jun 21 at 0:59

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