Formulas and User Functions
You create formulas to define the relationships among the data cubes in an analytic model. For example, this formula for the GROSS_MARGIN data cube defines the relationship between GROSS_MARGIN and other data cubes called SALES and COST_OF_GOODS:
SALES - COST_OF_GOODSThe analytic calculation engine recalculates the values in the GROSS_MARGIN data cube whenever the end user changes the values in the SALES or COST_OF_GOODS data cubes and saves those changes.
Formulas refer to kinds of information as defined by data cubes. Formulas do not refer to specific values. The relationship between GROSS_MARGIN, SALES, and COST_OF_GOODS remains true regardless of the specific data contained in these data cubes. You can attach new products or months to the data cubes without changing or copying the formula because the relationships between the data cubes have not changed.
User functions serve several purposes. You can create a user function that contains all or part of a formula and apply this user function to calculate multiple data cubes. You can also create user functions to define filter functions and rules for aggregating dimension members.
See Understanding Rules, Formulas, and User Functions, Understanding Dimension Members.