cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Calculated SharePoint column giving 13 decimals when imported into PowerApps

Hello 

 

I have created quite a complex formula in a Calculated field in SharePoint and have included this field in my app, however it is pulling through with 13 decimals. 

 

Please advise how one can remove these decimals - please be specific as to if the changes need to be in SharePoint or PowerApps. 

 

Thank you 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Hi @Casey-Lee ,

Do you want to remove the decimals from your Calculate field in your app?

 

Actually, it is an known issue with Calculated field within PowerApps app. If you want to remove the decimals from your Calculated field in your app, I think the Round function could achieve your needs.

 

Please consider take a try with the following formula in your app:

Round(
      Value('Your Calculated Field'),
      0
)

If you want to display the Calculated field within a Gallery in your app, please set the Text property of Label to following:

Round(
      Value(ThisItem.CalculatedField),
      0
)

 

If you want to remain two decimals from your Calculated field in your app, please consider take a try with the following formula:

Round(
      Value('Your Calculated Field'),
      2
)

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

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

7 REPLIES 7
Highlighted
Super User II
Super User II

If your 13 decimal digit is a number, you can use a formula like this: 

Text(Value("2.1234567890123"),"[$-en-US]#.0")  (this converts the text to value and then uses the text function to format that value with one decimal place). The result of this formula is 2.1

 

If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit(Haman)

Highlighted
Community Support
Community Support

Hi @Casey-Lee ,

Do you want to remove the decimals from your Calculate field in your app?

 

Actually, it is an known issue with Calculated field within PowerApps app. If you want to remove the decimals from your Calculated field in your app, I think the Round function could achieve your needs.

 

Please consider take a try with the following formula in your app:

Round(
      Value('Your Calculated Field'),
      0
)

If you want to display the Calculated field within a Gallery in your app, please set the Text property of Label to following:

Round(
      Value(ThisItem.CalculatedField),
      0
)

 

If you want to remain two decimals from your Calculated field in your app, please consider take a try with the following formula:

Round(
      Value('Your Calculated Field'),
      2
)

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

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

Highlighted

Hi @v-xida-msft 

 

So initially I accepted the solution and put the below in text field for the gallery. 

Round(
      Value(ThisItem.CalculatedField),
      0
)

I wanted to show this with the Customer name so created the below in the Subtitle text 

ThisItem.'Customer Name' & " - " & Round(Value(ThisItem.'Certainty %'),0) & " %"

 

It shows perfectly in my desktop app as per the below screenshot 

Certainty % Issue.png

 

But when I published the app the % goes "0%" as per the screenshot below: 

 

WhatsApp Image 2019-11-18 at 13.49.03.jpeg

I would really appreciate some assistance please.

Highlighted

Hi @Casey-Lee 

 

Are you sure its the same data? Just by looking at it and not knowing all the details, it looks different in the two images. Can you, if you haven't already, test it with same data?

 

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit(Haman)

Highlighted

Hello @PowerAddict 

It definitely is the same data.🙂 I had the search bar on "Shamim" however please see screenshot below for "Dean" as per my app screenshot on the previous message.

Dean.png

Highlighted
Frequent Visitor

It looks that PowerApps does not detect type of calculated field of SharePoint. Do value function first and then format output

 

Text (   Value(  YourCalculatedSharePointFIels )  , "#,###"   )

 

Example 

 
Text( Value(ThisItem.'Ammount'),"#,###")  will show > 1,232,322  format

 

Highlighted
New Member

The only solution that worked for me was using Split function in combination with First. This function generates a Table result so we need to get the first record that relates with whole number part and then point to Result field, like so:

First(Split(record.'SPO Calculated Field',".")).Result

If SPO calculated field return 30.0000000000000, for example, Split generates this table:

 

Result
30
0000000000000

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,752)