![]() Previous |
![]() Next |
Hierarchical relation conditions specify the comparison of the relationship of a hierarchy member to itself or to another member of the hierarchy.
expr1 IS [ NOT ] { PARENT | CHILD | ANCESTOR | ROOT_ANCESTOR | DESCENDANT | LEAF_DESCENDANT | RELATIVE } [ OR SELF ] OF expr2 WITHIN hierarchy
expr1 is any expression, including a literal or a column, that resolves to a dimension member.
PARENT compares expr1 as the parent of expr2.
CHILD compares expr1 as a child of expr2.
ANCESTOR compares expr1 as an ancestor of expr2.
ROOT_ANCESTOR compares expr1 as the highest-level ancestor of expr2.
DESCENDANT compares expr1 as a descendant of expr2.
LEAF_DESCENDANT compares expr1 as a descendant that has no children of expr2.
RELATIVE compares expr1 as a dimension member that has a parent in common with expr2.
OR SELF compares expr1 as the same dimension member as expr2.
expr2 is any expression, including a literal or a column, that resolves to a dimension member.
hierarchy is the hierarchy to consider when determining the relationship between expr1 and expr2, expressed in the form dimension_name.hierarchy_name, as in PRODUCT.PRIMARY, or owner.dimension_name.hierarchy_name, as in GLOBAL.PRODUCT.PRIMARY.