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

Re: Calculated SharePoint column giving 13 decimals when imported into PowerApps

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

6 REPLIES 6
Highlighted
Super User
Super User

Re: Calculated SharePoint column giving 13 decimals when imported into PowerApps

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

Re: Calculated SharePoint column giving 13 decimals when imported into PowerApps

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
Helper I
Helper I

Re: Calculated SharePoint column giving 13 decimals when imported into PowerApps

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
Super User
Super User

Re: Calculated SharePoint column giving 13 decimals when imported into PowerApps

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
Helper I
Helper I

Re: Calculated SharePoint column giving 13 decimals when imported into PowerApps

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

Re: Calculated SharePoint column giving 13 decimals when imported into PowerApps

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

 

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,997)