Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

FORMAT() of numbers not using regional settings

Hello

I have a problem with Format function when it comes to regional settings. My regional setting is Dutch (Netherlands) for current file, so thousand separator is dot, which is okay when I display it as a numer:

niepytam_0-1646386658071.png

The problem is when I display it as string with help of a Format function which stands for: 

text2 = format([total];"0,0")
 
niepytam_1-1646386708813.png

Which is wrong because I need to display the number with dot as thousand separator not comma.

 

Can someone help? Maybe I use Format type "0,0" in a wrong way?

 

 

 

2 ACCEPTED SOLUTIONS

Hi @Anonymous,

It seems like the default output type does not suitable for your requirement, you can try to use custom format strings with 'common' format and add locale option to change the return results. (notice: the comma and dot characters have special definitions in the custom string so you can't directly replace the thousand and decimal separators to achieve your requirements)

Measure = 
FORMAT ( SUM ( 'Table'[Amount] ), "#,##0", "nl_NL" )

1.png
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

HI @Anonymous,

It seems like the power bi service does not support some detailed locale. After I change locale code to 'nl' (Dutch locale code) the visual works again on power bi service. 

Measure = 
FORMAT ( SUM ( 'Table'[Amount] ), "#,##0", "nl" )

1.png

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

9 REPLIES 9
amitchandak
Super User
Super User

@Anonymous , In the column and measure tools you have a thousand separators, Try that.

 

Also use you regional separator and check -as setting is regional

 

 

Anonymous
Not applicable

Hi

but unfortunately it is a text so i dont have that option with separators:

niepytam_0-1646390169543.png

 

 

HI @Anonymous,

In my opinion, using the format function should not be a good choice. This function will force convert the result to text type which will ignore the aggregation features.

I'd like to suggest you check and modify the system region 'formats' settings or use custom format string on your field to change the display value formats.

Solved: Re: Decimal separator : Comma / Thousand separato... - Microsoft Power BI Community

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

HI @v-shex-msft 

unfortunately I have to do the formatting this way because I need to implement the value as text in shape. But I had the idea that I could use the SUBSTITUTE function for the text and thus replace the comma for the dot.

HI @Anonymous,

Perhaps you can take a look at the following link about format function usage if helps:

FORMAT function (DAX) - DAX | Microsoft Docs

Sample: format with locale option.

Measure =
FORMAT ( SUM ( 'Table'[Amount] ), "Standard", "nl_NL" )

1.png

List of Country Language Locale Code - saimana.com

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Hi @v-shex-msft 

Thank you very much. the measure written above works, but there is one problem that it displays a decimal value:

niepytam_0-1646901802280.png

 

and I need a view:

niepytam_1-1646901814939.png

 

So how can I change the "Standard" field?

Hi @Anonymous,

It seems like the default output type does not suitable for your requirement, you can try to use custom format strings with 'common' format and add locale option to change the return results. (notice: the comma and dot characters have special definitions in the custom string so you can't directly replace the thousand and decimal separators to achieve your requirements)

Measure = 
FORMAT ( SUM ( 'Table'[Amount] ), "#,##0", "nl_NL" )

1.png
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Hi @v-shex-msft 

It works in Power BI Desktop, but when I publish it into Power BI Server I can't see visuals:

niepytam_1-1647005115408.png

 

And there is an error:

niepytam_0-1647005099694.png

What should I do?

 

HI @Anonymous,

It seems like the power bi service does not support some detailed locale. After I change locale code to 'nl' (Dutch locale code) the visual works again on power bi service. 

Measure = 
FORMAT ( SUM ( 'Table'[Amount] ), "#,##0", "nl" )

1.png

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.