4 Replies Latest reply on Dec 13, 2011 9:27 AM by fmpro_novice

    Round up calculation result



      Round up calculation result


      I have a file that I use to calculate baskeball stats. One stat is shooting percentage, which would be shots made divided by shots attempted. If a player shoots the ball 6 times and makes two of them, my results are returned as:


      I would like to return that result as 33. Can someone tell me how to do this?

      Another example is, a player has 9 made shots, 13 attempts, comes back as:


      I would like that returned as 69.





        • 1. Re: Round up calculation result

          If the percentage is 0.6666666, do you want 66 or 67?

          Assuming 67, you can use either the round function in your calculation to round the value to a specified number of decimal places or you can use data formatting to display the value formatted with 0 decimal places. Either result displays the same value, but keeping the value unrounded in the calculation field may be the better option if you also need to use this result in other calculations.

          You can either multiply by 100 to turn 0.67 into 67 or you can use the same data formatting in the inspector to specify a percent format.

          • 2. Re: Round up calculation result


            Hey Phil - Thanks for responding to my post. I really have no idea to do what you said. In my fields description I have Percentage set to calculation. And the calculation is: Made / Attempts

            I don't know what else to do to get it to Round and then display as 100 times the amount. And, yes, .6888888 would need to be 69.

            • 3. Re: Round up calculation result

              Either use:

              Round ( Made / Attempts * 100 ; 0 )

              or use:

              Made / Attempts * 100

              But then, when you put it on your layout, go to the data tab of the inspector and scroll down to data formatting. Withe the field still selected, specify a decimal with 0 decimal places.

              Since this is a shooting percentage, you can also use:


              but specify a percent value in data formatting with 2 decimal places. This will display a 2 out of 3 result as:


              • 4. Re: Round up calculation result

                 Thank you. That does exactly what I need it to do. Thank you for your time!