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

Dealing with Float datatype

Hi Team, 

 

I have a Float datatype column in SQL Server and when trying to populate that to powerapp through  Gallery -> Label , I see that the value is being chopped.

 

ex: 0.272245892490096 [Actual value] is displayed as 0.27224589 and is chopping to 8 digits after the decimal. is there a way I can get the complete number. 

 

As these are Foreign exhange values we cannot slip atleast one digit. 

 

Any help is appreciated. See below for the screen shot

 

Capture.JPG

 

thanks 

Sundeep

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support Team
Community Support Team

Re: Dealing with Float datatype

Hi @Sundeep,

I have made a test, and the issue is confiemed on my side.

I agree with @timl's thought almost. PowerApps numeric limits are defined by Javascript&colon. Currently, the max decimal places of a Number type value is 8.

If you would like to get more decimal places (more than 😎 for a Number type value within PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

As an alternative solution, you could consider take a try to create a Varchar type column to store the Foreign exhange values within your SQL table.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Sundeep
Level: Powered On

Re: Dealing with Float datatype

@v-xida-msft, I accept that Kris, Submitted an Idea already and its under review now. I spoke with the Engineering team as well and seems by design there is a limitation. But it happens only with PowerApps - >  Gallery control but not with  Data Table control. DataTable shows everything fine.. 

 

Thanks for jumping in to help us. Appreciated:) 

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Dealing with Float datatype

Hi @Sundeep,

I did a little experiment and found that apparently Powerapps is hard coded to accept a maximum of ten decimal places.  (I looked at the function Pi().)  and used Text(Pi(),"#.##########")  putting more #'s beyond 10 did not change the value shown. When any function was used to either multiply or divide Pi, the result was limited to 8 decimal places, again regardless of the number of #'s shown.

 

If you need more than 10 decimal places shown, I suggest that you submit a request to the Powerapps Ideas forum. 

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

Please mark this as solved if it answers your question.

Super User
Super User

Re: Dealing with Float datatype

Hi @Sundeep

 

I think that @Drrickryp is correct about there being a hard limit on the number of decimal places that you can use in PowerApps.

When I asked a similar question, @AndyPennell explained that JavaScript imposes limits on the accuracy of the numbers that PowerApps can use. I suspect you might be encountering the same issue.

https://powerusers.microsoft.com/t5/General-Discussion/What-s-the-maximum-value-you-can-store-in-a-n...

Here's another thread that you might find useful if you're working with SQL Server and numbers.

https://powerusers.microsoft.com/t5/General-Discussion/Loss-of-precision-with-SQL-Server-BigInt-data...


If you need to display float values with the correct level of precision, perhaps you could create a SQL Server view and cast your float datatype column to the varchar data type? That way, PowerApps should interpret your foreign exchange values as text and display the correct number of decimal places.

Community Support Team
Community Support Team

Re: Dealing with Float datatype

Hi @Sundeep,

I have made a test, and the issue is confiemed on my side.

I agree with @timl's thought almost. PowerApps numeric limits are defined by Javascript&colon. Currently, the max decimal places of a Number type value is 8.

If you would like to get more decimal places (more than 😎 for a Number type value within PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

As an alternative solution, you could consider take a try to create a Varchar type column to store the Foreign exhange values within your SQL table.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Sundeep
Level: Powered On

Re: Dealing with Float datatype

@v-xida-msft, I accept that Kris, Submitted an Idea already and its under review now. I spoke with the Engineering team as well and seems by design there is a limitation. But it happens only with PowerApps - >  Gallery control but not with  Data Table control. DataTable shows everything fine.. 

 

Thanks for jumping in to help us. Appreciated:) 

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
Users Online
Currently online: 308 members 5,601 guests
Recent signins:
Please welcome our newest community members: