cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Loadlucas
Level: Powered On

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
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: 2 decimals with ThisItem

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

Loadlucas
Level: Powered On

Re: 2 decimals with ThisItem

Thanks !

 

Exactly what i wanted

 

Thank you very much !

View solution in original post

4 REPLIES 4
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: 2 decimals with ThisItem

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") & " €"

 

Loadlucas
Level: Powered On

Re: 2 decimals with ThisItem

Hi,

 

Thank you for your response.

 

The fonction have no error but nothing happend.

 

It show always decimals ... Any idea ?

Capture.PNG

Thank you

 

PowerApps Staff CarlosFigueira
PowerApps Staff

Re: 2 decimals with ThisItem

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

Loadlucas
Level: Powered On

Re: 2 decimals with ThisItem

Thanks !

 

Exactly what i wanted

 

Thank you very much !

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,153)