cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Casey-Lee
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
v-xida-msft
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

10 REPLIES 10
PowerAddict
Super User
Super User

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)

v-xida-msft
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.

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.

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)

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

belallari
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

 

marcosmanto
Regular Visitor

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
Timothy333
New Member

I know this is an old thread but for anyone struggling to fix this issue, as I did, I found out that the reason this is happening to some people is due to location.

 

In your value function specify the location you would like to use eg.

Value(ThisItem.Value, "en-US") so that Power Apps knows to use a period "."  as a decimal.

 

Hope this helps😁

Finally it works! Thank you so much Timothy! you rock! 🤗

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (1,827)