Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
I have an issue with valueFormatter where it ignores the specified culture and always defaults to "en-US":
Solved! Go to Solution.
If the separator/decimal symbols are right after making the changes, it's probably "working." Unfortunately, I'm not best placed to determine how far it goes for the units, as English is my first language. During testing, I have only really confirmed the units match what *I* might expect (although I have a rudimentary understanding of which separators are needed for various locales). It is known that there are some cases where, even if all locales are bundled, Power BI doesn't provide the correct locale to the visual host (e.g., Swiss German, or de-CH), but it does supply de-DE correctly.
MS uses the Globalize library to handle localization in powerbi-visuals-utils-formatingutils, and from a cursory look, I think the unit handling is not culture-specific. If you want a definitive answer, your best bet would be to check directly with MS (pbicvsupport@microsoft.com).
All the best,
Daniel
Proud to be a Super User!
My course: Introduction to Developing Power BI Visuals
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Hello, @dm-p
Your suggestions fixed the issue but only partially. With the locales included, the valueFormatter is giving the correct thousands separator and decimal symbols based on the current locale. However, the units for thousand, million, billion (K, M, bn etc.) are not correct. Is this even supported? I decided to include specific locales. Thanks for the help anyway!
If the separator/decimal symbols are right after making the changes, it's probably "working." Unfortunately, I'm not best placed to determine how far it goes for the units, as English is my first language. During testing, I have only really confirmed the units match what *I* might expect (although I have a rudimentary understanding of which separators are needed for various locales). It is known that there are some cases where, even if all locales are bundled, Power BI doesn't provide the correct locale to the visual host (e.g., Swiss German, or de-CH), but it does supply de-DE correctly.
MS uses the Globalize library to handle localization in powerbi-visuals-utils-formatingutils, and from a cursory look, I think the unit handling is not culture-specific. If you want a definitive answer, your best bet would be to check directly with MS (pbicvsupport@microsoft.com).
All the best,
Daniel
Proud to be a Super User!
My course: Introduction to Developing Power BI Visuals
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Hi @wolfgang2,
Are you specifying --all-locales (or bundling de-DE) when running developer mode or packaging your visual? Recently, the tools omit locales due to their size when packaging and you must specify which to include. You can manually specify locales to include by adding an empty stringResources file for your desired languages, as detailed here. Personally, I run my dev and package commands with --all-locales, as despite the size, this provides the best overall support for global users if publishing to AppSource. If your visual is intended for a private audience, then it may be better just to add the locales you need.
Cheers,
Daniel
Proud to be a Super User!
My course: Introduction to Developing Power BI Visuals
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.