question

bi2013 avatar image
bi2013 asked

Sorting a SSAS Parent Child Hierarchy

I have a dimension with a Parent Child hierarchy. This hierarchy is ordered according to an attribute of the dimension. Is there some way to create a calculated member that uses the Sort Order attribute? I would like to be able to sort members of my parent child dimension based on another attribute. In my relational Dimension Table I have the following columns (among others) Dim1_Key Dim1_ParentKey Dim1_MemberName Dim1_SortSequence I have managed to construct the parent child dimension and would like to use the Dim1_SortSequence attribute to sort members, however when I try and set up a new attribute relationship, I receive the following message: "a parent attribute can't have attribute relationships"
ssas
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Pavel Pawlowski avatar image
Pavel Pawlowski answered
You should relate the Dim1_SortSequence to the Dim1_Key and set the sort attribute on the Dim1_Key. The Dim1_ParentKey which usage is set to parent is only used to build the hierarchy levels, however values are retrieved from the Key Attribute.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.