5

I am using QGIS and making stacked labels.

Using $length, how do I get a ' (single quote) to show up after the length ie 386'?

My current expression is:

run  +  '\n'  +  "sequence"   ||  '\n'  ||  round($length,0)
3

Assuming your field is named "sequence", then a simple solution to just add a single quote after a number field would be with the concat() function:

concat( "sequence", '''')

Result:

enter image description here

With the rest of your formulas (might need some adjustment) it should look something like this:

concat( run , '\n' , "sequence" , '\n' , round($length,0))
0

If I understand you correctly, the following will help you out: Go to labels -> placement -> repeat - punch in your number and set your choice of map units of milimeters.

Sorry for the german menu, couldn't switch to english right now: enter image description here

  • I cannot get these to work with "round($length,0)" The bottom number is where I need the ' or foot indicator. Otherwise I am happy. Thanks – kmikes Mar 28 '18 at 19:00
  • 1
    Oh, sorry, I am not used to imperial units, therefore I didn't see the foot-symbol. If you put the following expression in the field "label with": round($length,0) || ' ´' or concat(round($length,0),' ´') – Erik Mar 29 '18 at 22:14
  • 1
    Thanks for your help, I still could not get the ' to work, so decided to go to lf for linear feet, I notice your middle ' is angled, is that a different symbol from the single quote? – kmikes Apr 2 '18 at 20:10
  • 1
    OK I got it to work bu using a ʼ from character map, Thank You for your guidance – kmikes Apr 2 '18 at 20:42

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.