1 Reply Latest reply on Apr 26, 2015 6:27 AM by TSGal

    How to Make calculation for the next Decimal Number

    KshSoni

      Title

      How to Make calculation for the next Decimal Number

      Post

      Suppose i have no in field .2 it should take it as .5 , .6 = 1 or 1.2 to 1.5 . I need this to go on ! how to achieve this?

        • 1. Re: How to Make calculation for the next Decimal Number
          TSGal

          Ksh Soni:

          Thank you for your post.

          The Ceiling function will take any decimal value and rounds it up to the next integer.  Since you want to round up to the next .5 value, multiply the initial value by 2, take the Ceiling of that value, and then divide by 2.  For instance, if your Number field is named "Number", the calculation would be:

          Ceiling ( 2 * Number ) / 2

          Using your example of 1.2 for Number::
          Ceiling ( 2 * 1.2 ) / 2
          Ceiling ((2.4) / 2
          3/2
          1.5

          Let me know if you need additional clarification.

          TSGal
          FileMaker, Inc.