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

removing decimal places from text boxes

Hi, 

 

I am trying to remove the decimal places on the output of a calculation for a text box. 

 

(DataCardValue137.Selected.Value + DataCardValue138.Selected.Value + DataCardValue139.Selected.Value) / 15 * 100

 

attempted round down function but having issues to make it work. 

 

Can anyone help?

 

thanks!

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: removing decimal places from text boxes

Hi @Channah ,

Could you please show more details about the issue that you mentioned?

Do you want to remove the decimal places from the Calculation result?

 

Based on the needs that you mentioned, I think the Round function could achieve your needs. Please consider set the Default property of the Text Input Box to following:

Round(
      (DataCardValue137.Selected.Value + DataCardValue138.Selected.Value + DataCardValue139.Selected.Value) / 15 * 100,
      0
)

Note: The Round function is required to provide two arguments value. Please check the following article for more details:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-round#syntax

 

If you want to remain two decimals within the Text Input box for your calculation result, please modify above formula as below:

Round(
      (DataCardValue137.Selected.Value + DataCardValue138.Selected.Value + DataCardValue139.Selected.Value) / 15 * 100,
      2
)

Please 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

3 REPLIES 3
Highlighted
Regular Visitor

Re: removing decimal places from text boxes

Hi,

 

Please find below the URL. I hope it will help you to resolve your issue.

 

you can use like below expression -

int(DataCardValue137.Selected.Value + DataCardValue138.Selected.Value + DataCardValue139.Selected.Value) / 15 * 100)

 

for More Details check the below-mentioned thread.

 

https://powerusers.microsoft.com/t5/Building-Flows/Removing-decimal-points-on-calculated-column/td-p...

 

Thanks,

 

 

Highlighted
Community Champion
Community Champion

Re: removing decimal places from text boxes

You can also try:
Text(Value(DataCardValue137.Selected.Value + DataCardValue138.Selected.Value + DataCardValue139.Selected.Value) / 15 * 100),"[$-fr-FR]# ###","fr-FR")

 
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Highlighted
Community Support
Community Support

Re: removing decimal places from text boxes

Hi @Channah ,

Could you please show more details about the issue that you mentioned?

Do you want to remove the decimal places from the Calculation result?

 

Based on the needs that you mentioned, I think the Round function could achieve your needs. Please consider set the Default property of the Text Input Box to following:

Round(
      (DataCardValue137.Selected.Value + DataCardValue138.Selected.Value + DataCardValue139.Selected.Value) / 15 * 100,
      0
)

Note: The Round function is required to provide two arguments value. Please check the following article for more details:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-round#syntax

 

If you want to remain two decimals within the Text Input box for your calculation result, please modify above formula as below:

Round(
      (DataCardValue137.Selected.Value + DataCardValue138.Selected.Value + DataCardValue139.Selected.Value) / 15 * 100,
      2
)

Please 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

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

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

Top Solution Authors
Top Kudoed Authors
Users online (10,778)