Start a conversation

Rounding algorithm in Hyperion Rules


  Modified 28-JUL-2010  

Applies to:

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

Goal

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. 

Solution

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 
  Else 
     Multiplier = -1 
  End If 

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

End Function


Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. GKontos

  2. Posted

Comments