1

I am having an attribute table in a layout with one of the columns being % values using the expression:

to_string("input data_1_ant_care") + to_string('%')

The challenge is the numeric variable "input data_1_ant_care" may have some values to 1 decimal place and others not. I would like all of them to be displayed to 1 decimal place.

The current output is shown below:

enter image description here

My desired output is to have 100.0% for county number 1, 98.0% for the 6th etc.

1 Answer 1

3

Use the format_number():

 format_number("input data_1_ant_care", 1) + to_string('%')
1
  • Thanks so much for your help Apr 16, 2023 at 18:43

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.