5

How can I use commas to separate thousands for numbers with five or more digits (not four digits) in the map in QGIS, e.g., “10000” should be “10,000” in the annotation. To clarify, the region in question is located in Tunisia. Regarding the annotations in the grid, not the attribute table field names, I would like the coordinates to be displayed as "560,000" instead of "56,000" in my figure. enter image description here

2

2 Answers 2

3

I think this is a region-related setting. You could try changing the region or formatting your number as a string (we need more context to see where the number is located on the map).

Settings

Here is how you can do it with Field Calculator: format_number(10000, 2, 'eng')

Field Calculator

0
2

if(length("name of your column")>4,format_number("name of your column",language:='en'),format_number("name of your column",omit_group_separators:=true)

First you need to check, whether your field has more than four digits. This is the length() part of the expression. If there are more than four digits, the language:='en' forces the use of commas as thousands separator. If not, omit_group_separators:=true disables the separator.

For more details, see the documentation entry on format_number().

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.