I have a column (see below) where I want to label only part of the row.

Example: 16-23-1-01-7 -a -00

I want to label only: 7 -a

Is it possible in QGIS?

enter image description here


You can use string functions for the labelling the same way as for the field calculator. In your case when the data is uniform it should be easy.

In the labeling options you go to the expression dialog (right beside the "label with" drop down menue)

Then put into the expression window:


That should show you only the text of your field from position 12 to 16 that should be the desired outcome. Possibly you need to use other position values.

| improve this answer | |
  • The other option is RegEX. With regexp_substr( input_string, regex). But if the data is uniform a simple substr is much easier. – HeikkiVesanto Jun 14 '16 at 13:51

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.