SSAS: How to Sort parent Hierarchy Members of a Dimension by another Attribute

Scenario: You have a small Dimension containing a Hierarchy. You need all the child members as well as the parent members to be sorted.

Solution excerpt: Add the Sort Attribute by which the Parent Attribute should be ordered by as a new Attribute Relationship to the Dimension and then set the OrderBy property to Attribute Key and the OrderByAttribute to the Sort Attribute

Example

  • Parent Attribute: “PuL
  • Child Attribute: “BwaZeileKey
  • Child Sort Attribute: “Sortierung
  • Parent Sort Attribute: “PulSortierung
Extract of BwaZeileDim which is joined to PulDim that contains the PulSortierung

Result

See how the parent members are sorted by a userdefined key attribute and not by name