I am working with data in Colombia where decimal points are written as commas. I would love to create a new column in QGIS that would convert all decimal points (periods) to commas for the purpose of labeling. Any thoughts?
2 Answers
You'll want to create a new text column and replace points with commas. The function is replace(original_string, find_text, replace_text)
; you'll need to convert the original number to a string, too. If you have a column LBL which is the number you want to use as a label:
- Start editing the layer, open the attributes table and start the field calculator.
- Select an output field name and make sure it's text.
- In the 'Field calculator expression', paste the expression
replace(to string(LBL), '.', ',' )
and clickOK
.
For a longer term solution, you could probably change the region on your system too.