Forum Discussion
Trouble with Format function when concatenating a string, locale is not respected
Hi,
Im trying to create a text string that concatenates both a numeric value and a decimal value.
I'm using Text measure = FORMAT([Numeric value];"#,0") &" ( "&FORMAT([Decimal value];"0%")&" )"
The problem is that for the numeric value my setting for locale (Swedish) is not respected and the thousand separator used by the format function is ","
According to the documenation https://msdn.microsoft.com/en-us/library/ee634206.aspx this should not be the case...
Is there any other way to get this working?
Thanks,
Magnus
4 Replies
- AnonymousNot applicable
Anonymous,
I can reproduce your issue. I will report this issue internally and post back once I get any updates.
Regards,
Lydia- AnonymousNot applicable
Okay I have found some more info regarding this issue.
marcorusso explains in this article ( link ) that the culture of the data model does not change after the file has been created. This apparently has the consequence that functions such as FORMAT only respects the culture that is set for the data model and not what is set in the GUI.
I was able to change the culture of my model to "sv-SE" using Marcos steps in the article and it solved my current formatting issue.
However, regardless of my culture setting in my OS all new PBI-files that I create seems to get the culture "en-US" so there must be something that is not working as it should!
- v-haibl-msftMicrosoft Employee
Anonymous
I’ve got response from the Product Team.
The model's culture is en-US so it seems like it is created on an US English machine. DAX functions use locale derived from the culture set in the model, not on the machine which the model is used. Note that once a model is created, its culture cannot be changed.
Best Regards,
Herbert