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") & " €"
Loadlucas
Level: Powered On

Re: 2 decimals with ThisItem

Thanks !

 

Exactly what i wanted

 

Thank you very much !

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") & " €"
Loadlucas
Level: Powered On

Re: 2 decimals with ThisItem

Thanks !

 

Exactly what i wanted

 

Thank you very much !

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 31 members 4,397 guests
Please welcome our newest community members: