Knowledgebase: HFM
Rounding algorithm in Hyperion Rules
Posted by Priya Doyle, Last modified by Priya Doyle on 16 November 2010 03:46 PM

 Modified 28-JUL-2010 

Applies to:

Hyperion Financial Management - Version: to - Release: 4.1 to 11.1
Information in this document applies to any platform.


The VBScript Round() function does not round "4 down / 5 up".   At 0.5, the VBScript / Excel function rounds either up or down depending on whether the preceding figures is odd or even.  The belief is this provides a statistically "even" number of instances that round up to those that round down. 

So a custom routine in rules is required if you want to use the "4 down / 5 up" rounding. 


In HFM v11.1.1, we have provided a template for "Financial Rounding". For earlier versions, the client can use the following VBScript function: 
Function FinancialRound(dData, iNumDecimalPlaces) 

  iNumDecimalPlaces = Fix(iNumDecimalPlaces) 
  If dData > 0 Then 
     Multiplier = 1 
     Multiplier = -1 
  End If 

  dTempData = dData * (10 ^ iNumDecimalPlaces) 
  dTempData = dTempData + (0.5 * Multiplier) 
  dTempData = Fix(dTempData) 
  dTempData = dTempData / (10 ^ iNumDecimalPlaces) 
  FinancialRound = dTempData 

End Function

(1 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name: