In QGIS 3.22 I would like to label an area with decimal values. In the attribute table, the values are displayed separated by commas, but the areas are labelled separated by periods.
After converting to string and replacing "."
with ","
In QGIS 3.22 I would like to label an area with decimal values. In the attribute table, the values are displayed separated by commas, but the areas are labelled separated by periods.
After converting to string and replacing "."
with ","
If you have QGIS 3.28 or newer, you can use this expression to remove the thousand separator:**
format_number("Area", places:=1, omit_group_separators:=true)
You need to use the format_number
function as your label expression:
format_number("Area", places:=1)
It will format your real value to a string using your locale formatting (comma vs period separator).
The locale can be changed (overridden) in Options > General > Override System Locale > Locale
you can also directly override the locale in the expression:
format_number("Area", places:=1, language:='fr')