RANGE in Empower formula

Options
I have a custom field with the formula RANGE(ROUND(Amount,0),CConst1,CConst2) and my current spec states the range is 90-100 (integers) but if I put 90 in CConst1, it doesn't include this value because Range excludes the first value (X+1,Y). I tried to account for this by editing the formula to RANGE(ROUND(Amount,0),CConst1-1,CConst2) but strangely when I tested this formula it didn't work. I got an Amount value of 98.769 which when rounded to zero decimal places rounds to 99 so I put 100 into CConst1 and it should have included 99 because 100-1 is 99 but my value came to Fail instead of Pass. Am I missing something here about the formula or does Empower not work when you subtract 1 from CConst?

Answers

  • The RANGE custom field expects RANGE(Parameter, Lower_Boundary, Upper_Boundary). As far as I am aware the Parameter is allowed to be mathematical in nature and a nested function (e.g. ROUND(Amount,0)). However, the boundary conditions must be a number.

    When I have setup range calculations I've always used one decimal more than required (e.g. 89.9) and rounded that reportable parameter to the correct number of sig figs via the report.

  • Thanks shainwat, yes that's why I round the parameter, so if my range according to a spec is 98-102 then I put in 97 as lower range so it accepts any value greater than the lower range and the lowest number (rounded to zero) that's greater than 97 is 98. Same if 98.0 to 102.0 then the lower becomes 97.9 when rounded to 1 decimal place. 
  • Hi, how many decimals involved in custom field calculation In empower 

  • Any ligal document in waters.
  • shaunwat
    edited November 2018
    Options

     That is a complicated question with a complicated answer.

    The core subject won't be relevant to you, but this part is:

    Microsoft defined double-precision floating-point numbers as 15 digits. Oracle defines stroed double-precision numbers as being rounded from the 17th digit.

    So there is your under the hood answer. Clearly you can always change this be fixing the precision in your custom fields / reports.

    Hmmmm... can seem to attach a PDF, so how about:

    https://us.v-cdn.net/6030142/uploads/editor/h7/1jtczwrch0zt.pdf


  • I think you will find the attached helpful.

    I think you will find this link helpful.

    https://us.v-cdn.net/6030142/uploads/editor/h7/1jtczwrch0zt.pdf

    Microsoft defines double-precision floating point numbers as 15 digits. Oracle defines stored double-precision numbers as being rounded from the 17th digit.