The valid relationship types and the meaning of the Index parameter are described for each.
Relationship | Member or Level | Description |
FirstMember | Level | By default, returns the first member of the specified level. If the Index parameter is passed as x it gets the xth member of the level. |
LastMember | Level | By default, returns the last member of the specified level. If the Index parameter is passed as x it gets the xth member from the end of the level. |
Members | Level | Equivalent to FirstMember or LastMember. If the index is positive it acts like FirstMember, if it's negative it acts like LastMember. |
Parent | Member | Gets the parent of the member passed in. If index is 2, it'll return the grandparent (parent of the parent), 3 the great-grandparent etc. |
ParentAtLevel | Member | Gets the parent or ancestor of the member passed in. If the index parameter is passed, this is the level number the parent must come from. Level number is one-based. (new in Version 8) |
Next | Member | Gets the next member following the member passed in. If the index is greater than one, then it skips forward that number of members. |
Previous | Member | Gets the previous member preceding the member passed in. If the index is greater than one, then it skips backward that number of members. |
FirstSibling | Member | Gets the first member with the same parent as the member passed in. If the index is greater than one, then it gets the child at that index. |
LastSibling | Member | Gets the last member with the same parent as the member passed in. If the index is greater than one, then it gets the child at that index from the last sibling. |
Siblings | Member | Equivalent to FirstSibling or LastSibling. If the index is positive, it acts like FirstSibling. If it's negative, it acts like LastSibling. |
FirstChild | Member | Gets the first child of the member passed in. If the index is greater than one, then it gets the child of that index. |
LastChild | Member | Gets the last child of the member passed in. If the index is greater than one, then it gets the child at that index from the last child. |
Children | Member | Equivalent to FirstChild or LastChild. If the index is positive it acts like FirstChild. If it's negative, it acts like LastChild. |
FirstDescendantAtLevel | Member | Returns the first descendant of the member at a level specified by index. Index is one-based. |
LastDescendantAtLevel | Member | Gets the last descendant of the member at a level specified by index. Index is one-based. |
FirstDescendantAtDistance | Member | Gets the first descendant of the member at a distance specified by index. An index of one is the equivalent of children. |
LastDescendantAtDistance | Member | Gets the last descendant of the member at a distance specified by index. An index of one is the equivalent of children. |
DefaultMember | Any | Gets the default member for the hierarchy. |
Item | Level | If the Index parameter is passed as 'x' it gets the xth member of the level. Useful as it also supports sets using the MdxSet: syntax. |