Forum Discussion
Format() not using the regional settings
Hello,
I am having issues when formating numbers in strings using the format() function.
My local regional settings on power BI, as well as my regional settings on Windows, are set to English (Singapore), which normally use "." as decimal separator and "," as thousand separator.
This works fine when I shows measures in visuals such as tables, cards, etc.
However, when creating a text measure (see below), using a format(..... , "0,0") function, the thousand separators becomes space (which is used in the french format). I don't see why format() shouldn't behave the same way as a measure of type number.
Can someone help?
- Anonymous9 years ago
Hi Anonymous,
I am not able to reproduce your issue in the latest version of Power BI Desktop (2.45.4704.722), please check the region settings in my environment.
Do you use same version of Power BI Desktop as mine? And how about using the following formula to create your measure?
measure= FORMAT([qty],"0%") &" of " & FORMAT([INITIAL BUY],"#,0") & " pcs "
Thanks,
Lydia Zhang It worked well.
Please note I used WinZip and Notepad++ as editor. I added the modified file to the existing ZIP (renamed from PBIT) instead of creating a new one from scratch.
You can see the result here (dropbox).
9 Replies
- AnonymousNot applicable
Hi Anonymous,
I am not able to reproduce your issue in the latest version of Power BI Desktop (2.45.4704.722), please check the region settings in my environment.
Do you use same version of Power BI Desktop as mine? And how about using the following formula to create your measure?
measure= FORMAT([qty],"0%") &" of " & FORMAT([INITIAL BUY],"#,0") & " pcs "
Thanks,
Lydia Zhang- AnonymousNot applicable
Hi Lydia,
I've tried reproducing the issue also on my side from a new PBI Desktop file, and there was no issue anymore...
Not sure what happens with my previous file. The only explanation i have is that i had started that file with a French locale settings, later changed to English.
Since new files seems to work, I think we can close the issue ;) Thanks for your quick reply!
- marcorusso
Most Valuable Professional
I wrote an article explaining how to change the culture settings that is inherited from the operating system current culture when you create a Power BI Desktop file and that you cannot change later (in Power BI Desktop UI).
http://www.sqlbi.com/articles/changing-the-culture-of-a-power-bi-desktop-file/
I hope it helps.
Marco Russo - SQLBI