cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Loadlucas
Regular Visitor

2 decimals with ThisItem

Hello,

I'm new with PoxerApps and i wonder how to show the result of this fonction

ThisItem.PA_UNIT & " €"

only 2 decimals

 

Thanks for you help

 

Loadlucas

2 ACCEPTED SOLUTIONS

Accepted Solutions

I see that the value is being shown with a '.' as the decimal separator. since your language seems to be French, numbers would typically be shown with the ',' separator instead. Is the type of PA_UNIT string (text)? If so, then you may need to first convert it into a number (you can use the Value function for that), then use the Text function to write it with the desired number of decimal places. The expression would be something along the lines of

Text(Value(ThisItem.PA_UNIT; "en-US"); "[$-fr-FR]0,00") & " €"

View solution in original post

Thanks !

 

Exactly what i wanted

 

Thank you very much !

View solution in original post

4 REPLIES 4
CarlosFigueira
Power Apps
Power Apps

You can use the Text function to convert a number to a text with an appropriate number of decimals, like in the example below:

Text(ThisItem.PA_UNIT; "0,00") & " €"

Or if the decimal separator for your language is '.', then you'd use this expression:

Text(ThisItem.PA_UNIT, "0.00") & " €"

 

Hi,

 

Thank you for your response.

 

The fonction have no error but nothing happend.

 

It show always decimals ... Any idea ?

Capture.PNG

Thank you

 

I see that the value is being shown with a '.' as the decimal separator. since your language seems to be French, numbers would typically be shown with the ',' separator instead. Is the type of PA_UNIT string (text)? If so, then you may need to first convert it into a number (you can use the Value function for that), then use the Text function to write it with the desired number of decimal places. The expression would be something along the lines of

Text(Value(ThisItem.PA_UNIT; "en-US"); "[$-fr-FR]0,00") & " €"

View solution in original post

Thanks !

 

Exactly what i wanted

 

Thank you very much !

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

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,361)