cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
burgett94
Resolver II
Resolver II

Formatting Decimal Plances

Hello 

 

I have seen this mentioned through multiple posts however, I have followed each post I have found with none solving my issue.

 

We have a SharePoint List which has a calculated column with the below formula 

 

=ROUNDUP(IF(ISBLANK(Cost),0,IF(Cost<25,25,Cost*1.2)),2)

 

This provides an output like 25.00, 36.58, 125.33 etc.

 

When I pull this into Power Apps it comes through as 25.000000000000000, 36.580000000000000, 125.330000000000000 etc.

 

I have seen other posts recommend TEXT([value],"#.##") or ROUNDUP([value],2) but neither have worked for me.

 

I have also tried setting the calculated column to Single Line of Text, Number (2 decimals) and Currency (GBP with 2 decimals).

 

Have I missed a setting?

 

Annotation 2020-02-18 113619.png

Best regards,

Bradley
If this post helps, then please consider Accept it as the solution to help the other members find it more
1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

Hi @burgett94 

The text formatting function applies to numeric input values only. The thing that's most likely happening is that SharePoint is returning the value as a string, which explains why your formula doesn't work.

 

image.png

The solution is to convert your value to a number by calling the Value function within your call to Text. This should hopefully resolve the problem.

 

image.png

 

View solution in original post

2 REPLIES 2
WarrenBelz
Super User
Super User

Hi @burgett94 ,

I have struck that one before and my solution (such as it is) is to simply do the calculation by either a Variable or a hidden label in PowerApps as all the source fields are available.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

timl
Super User
Super User

Hi @burgett94 

The text formatting function applies to numeric input values only. The thing that's most likely happening is that SharePoint is returning the value as a string, which explains why your formula doesn't work.

 

image.png

The solution is to convert your value to a number by calling the Value function within your call to Text. This should hopefully resolve the problem.

 

image.png

 

View solution in original post

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,423)