cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MihirY
Advocate IV
Advocate IV

Decimal format not always uniform for US and Europe with Value function

I am having  a textbox which is allowing only number. Based on the number user enter, I am converting this into Value as below

If(Value(TextInput1.Text,"en-US")>0,"$"&Text(Value(TextInput1.Text,"en-US"),"[$-en-US] ###,##0.00"),"$" &Text(0,"[$-en-US] ###,##0.00"))

Above formula is working fine in US, Asia countries, but when user opens in Italian language, decimal formatting is different as below. How to make it uniform for all the countries to consider US decimal format?

image.pngimage.png

1 ACCEPTED SOLUTION

Accepted Solutions
MihirY
Advocate IV
Advocate IV

Fix is i need to use the resultant tag:

 

Text(Value(varTotalSpendByDate,"en-US"),"[$-en-US] ###,##0.00","en-US")

Adding "en-US" as last paramter to Text function working as expected

View solution in original post

2 REPLIES 2
v-yutliu-msft
Community Support
Community Support

Hi @MihirY ,

Do you want to transfer decimal format based on region?

I suggest you two ways:

1)use MicrosoftTranslator.Translate function

This function is used to translate text. I'm not very sure whether it will work for decimal format.

Try this:

MicrosoftTranslator.Translate(
If(Value(TextInput1.Text,"en-US")>0,"$"&Text(Value(TextInput1.Text,"en-US"),"[$-en-US] ###,##0.00"),"$" &Text(0,"[$-en-US] ###,##0.00")),
Language() )

Here's a doc about this function for your reference:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-language

 

2)use if statement to justify language

If(  Language()="en-US",
If(Value(TextInput1.Text,"en-US")>0,"$"&Text(Value(TextInput1.Text,"en-US"),"[$-en-US] ###,##0.00"),"$" &Text(0,"[$-en-US] ###,##0.00")),
If(Value(TextInput1.Text,"it")>0,"$"&Text(Value(TextInput1.Text,"it"),"[$-it-IT] ###,##0.00"),"$" &Text(0,"[$-it-IT] ###,##0.00"))
)

 

Here's a doc about Text function, I suggest you refer the Language placeholder part :

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-text

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
MihirY
Advocate IV
Advocate IV

Fix is i need to use the resultant tag:

 

Text(Value(varTotalSpendByDate,"en-US"),"[$-en-US] ###,##0.00","en-US")

Adding "en-US" as last paramter to Text function working as expected

View solution in original post

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,966)