6

I'm currently rounding my labels in QGIS using

 round(field_4,1)

in simple labels. This works great, but if the number is rounded to, say, 52.0 it shows as 52 instead. This is easily fixed for non-concacenated labels by enabling the following option in formatting (translation from danish: formatted numbers, decimalspaces):

formatting settings

This however doesn't seem to work for my concatenated labels shown below:

field_1 ||  '\n'  || '+' ||  round( field_4,1)

Is there a way to force QGIS to show trailing zeros?

1 Answer 1

8

You can make use of format_number and force it to have 1 decimal.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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