8.2. Enhancements to Parent-Child Hierarchies

The parent-child hierarchy structure is a particularly intuitive and quite common technique to model various business entities, and for this reason it is very important to master the modeling techniques related to it. In this section, the concepts discussed in the previous section are extended. Several important properties are supported by Analysis Services 2008 for parent-child hierarchies. One of those important properties is the UnaryOperatorColumn property.

8.2.1. Unary Operators

Unary operators are used for custom rollup of members to their parent where the rollup operation is a unary operation. A unary operator, as the name suggests, is an operator that takes a single argument — the member — and rolls up the value of the member to its parent. As with the custom rollup column, you need to have the unary operators specified as a column in the relational table, and this column must be set or mapped as a property for the parent-child hierarchy. Unary operators can be applied also to non parent-child hierarchies, but this is not a common scenario so it will not be covered here. The following table shows the various unary operators supported by Analysis Services and a description of their behaviors:

Unary OperatorDescription
+The value of the member is added to the aggregate value of the preceding sibling members. This is the default operator used if no unary operator column is specified.
The value of the member is subtracted from ...

Get Professional Microsoft® SQL Server® Analysis Services 2008 with MDX now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.