Tutorials
MSAS
Tutorial 36: MSAS: Creating Custom Rollups
Tutorial 36: MSAS: Creating Custom Rollups - Page 2
Tutorial 36: MSAS: Creating Custom Rollups - Page 3
Sponsored Links
Custom Rollup Formulas and Custom Member Formulas
Custom Rollup formulas and Custom member formulas are Multidimensional Expressions. They determine the cube cell values associated with members. While a custom rollup formula applies to all members (except calculated members) a custom member applies to a single member. Calculated members are not stored in the dimension table and provide additional members to the dimension table unlike Custom rollup formulas and custom member formulas.
Aggregate functions associated with measures are overridden by custom rollup formulas and custom member formulas. For example a measure uses a Sum aggregate function of the following kind.
2001: 2100
First quarter::500
Second quarter :500
Third quarter : 100
Fourth quarter:1000
2002: 900
First quarter: 100
Second quarter: 300
Third quarter: 400
Fourth quarter: 100
If the custom rollup formula specified is Time.CurrentMember.LastChild the result would be
2000:1000
2001: 100
Sponsored Links
The values for the quarters would remain unchanged.
Custom member formulas perform similar operations but are restricted to single members. The value for the fourth quarter of 2001 member in the Time dimension can be supplied by the formula
Time.[fourth quarter] *1.5
To apply custom rollup formula to only some members of the level, the IIf and RollupChildren functions are used. The RollupChildren function can roll up the children specified, using unary operators specified in the function.
Custom member formulas override custom rollup formulas. Calculated members have to be resolved before custom rollup formulas and custom rollup members are resolved. If a cube has multiple custom rollup formulas and custom rollup members, then the formulas are resolved in the order in which the dimensions have been added to the cube. The order of the dimensions can be viewed and changed using the Cube Editor window.
To specify a custom rollup formula in any level except the All Level, the Custom Rollup Formula property of the level has to be used. To specify it for the All Level the All Member Formula property of the dimension has to be used.
Custom rollup formulas can be specified both in a shared and a private dimension. If a cube contains both a shared and private dimension with custom rollup formulas, then the custom rollup formula of a private dimension takes precedence over a shared dimension’s formula.
Custom member formulas in a level can be enabled using the Custom Members property in the properties pane of the Dimension Editor(shared dimension) or Cube Editor(private dimension). Clicking the ellipsis button beside this property value displays the Define Custom Member Column dialog box in which the formulas can be defined. It must be noted that the formulas can only be created in the custom member formula pane of the Dimension editor or browser only if the dimension is write enabled.
Next Page: Tutorial 36: MSAS: Creating Custom Rollups - Page 2