Applying Formulas
An administrator can create a formula on a dimension member or in a business rule.
Member Formulas
The preferred and more common approach is to write formulas on dimension members. Member Formulas are written using the Formula property on individual Scenario, Account, Flow, or User Defined members in the Dimension Library. The primary reasons for writing formulas on dimension members are that they provide intuitive formula organization and promote reusability of dimensions and members with their associated calculations across multiple cubes. They also enable parallel processing for performance optimization using advanced multi‑threading that runs multiple formulas concurrently. Writing formulas on dimension members supports drill‑down from a calculated amount to the amounts used as the source for the calculation and supports the ability to vary formulas by Scenario and Time. This is useful because changes can be made without affecting calculations for older data or data in other scenarios.
Finance Business Rules
Formulas can also be written using one or more business rule files. While this is typically not the preferred approach, it provides the ability to place all formulas in a single location, similar to the approach used by some older competitive products. The primary reasons for writing formulas in a Finance business rule are when a formula requires extensive cross‑dimensional dependencies and it is not clear on which member an equivalent Member Formula should be written or when the formula requires complex sequential logic, variables, or conditional statements that affect multiple dependent calculations. Also, Finance business rules may be used when an application requires custom algorithms for currency rranslation, share, or intercompany eliminations.
TIP: Due to the sophisticated built-in translation and consolidation algorithms, most applications require only Member Formulas for the Data Unit Calculation Sequence (DUCS), for example, chart logic. Custom business rules for translation, share, and intercompany eliminations are not typically needed.
NOTE: Due to the way OneStream stores its data, Decimal should always be used instead of Double or Integer when declaring variables that return a number within a business rule or Member Formula.
Dim myNumber as Decimal = Api.Data.GetDataCell(“A#Sales – A#CostOfSales”).CellAmount
See Business Rules