8.2. Enhancements to Parent-Child Hierarchies

The parent-child hierarchy structure is particularly common in business so it is very important for you to master the techniques related to it. In this section, the concepts discussed in the previous section are extended. Several important properties are supported by Analysis Services 2005 for parent-child hierarchies. One of the important properties for a parent-child hierarchy is called the UnaryOperatorColumn.

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 as a property for the parent-child hierarchy. Unary operators can be applied also to non parent-child hierarchies, but that scenario will not be covered here. The following table shows the various unary operators supported by Analysis Services and a description of their behavior.

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 the aggregate value of the preceding sibling members.
*The value of the member is multiplied ...

Get Professional SQL Server™ Analysis Services 2005 with MDX now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.