Defining Member Functions

Member functions query for properties of the multidimensional cube structure and other objects upon which the underlying system is built. The functions query for child members, parent members, member names, and members levels. These functions are used in formulas for computing derived measures, and they define the scope of computations and mappings. The functions are either evaluated statically at compile time (and appropriate shortcuts are made), or they are evaluated at runtime.

In the following formula, when the system compiles and generates code for the measure in its cube, it knows the structure of the cube, the cube levels, and the cube dimensions:

measure1isLeaf = if(isLeaf(), measure2, measure3)

For those members that are leaf members, the following code is generated:

measure1 = measure2

For those members that are not leaf members, the following code is generated:

measure1 = measure3

The isLeaf function in this example is complied statically.

See Creating Cube-to-Cube Maps