The Hierarchize function organizes the members of specified set into hierarchical order. The function always retains duplicates.

If POST is not specified, the function sorts members in a level in their natural order. Their natural order is the default ordering of the members along the hierarchy when no other sort conditions are specified. Child members immediately follow their parent members.

If POST is specified, the Hierarchize function sorts the members in a level using a post-natural order. In other words, child members precede their parents.

Example

The following example drills up on the Canada member. The Hierarchize function is used to organize the specified set members in hierarchical order, which is required by the DrillUpMember function.

The following example returns the sum of the Measures.[Order Quantity] member, aggregated over the first nine months of 2003 contained in the Date dimension, from the Adventure Works cube. The PeriodsToDate function defines the tuples in the set over which the Aggregate function operates. The Hierarchize function organizes the members of the specified set of members from the Product dimension in hierarchical order.