ParentChildHierarchy
Self-referencing hierarchy where members can have parent-child relationships within the same table, creating variable-depth structures. This hierarchy type is ideal for organizational charts, account hierarchies, or any structure where the depth varies by branch and members reference other members as parents. ParentChildHierarchies support recursive relationships and dynamic navigation without requiring fixed level definitions.
Extends
Attributes
Name | Id | Type | Lower | Upper |
---|---|---|---|---|
nullParentValue | false | EString | 0 | 1 |
String value in the parent column that indicates root-level members (those without parents). Common values include '0', 'NULL', or empty string. This value identifies which members serve as the top-level roots of the hierarchy tree structure. | ||||
parentAsLeafEnable | false | Boolean | 0 | 1 |
Boolean flag that allows intermediate parent members to also appear as leaf members, enabling scenarios where the same entity functions both as a container and as a data point. When true, parents can have their own measures and participate in aggregations at multiple levels. Commonly used in account hierarchies where summary accounts also contain direct transactions. | ||||
parentAsLeafNameFormat | false | EString | 0 | 1 |
Format string for naming parent members when they appear as leaf nodes (used when parentAsLeafEnable=true). The format uses {0} as a placeholder for the original member name. Default format is '{0} (parent)' which creates names like 'Sales Manager (parent)' to distinguish the parent role from child member names. |
References
Name | Type | Lower | Upper | Containment |
---|---|---|---|---|
parentChildLink | ParentChildLink🔗 | 0 | 1 | true |
Optional closure table configuration for performance optimization of parent-child queries. The closure table pre-computes all ancestor-descendant relationships, enabling efficient recursive queries and aggregations. When specified, provides significant performance benefits for deep hierarchies with complex drill-down operations. | ||||
parentColumn | Column🔗 | 0 | 1 | false |
Column containing the parent reference for each member, establishing the self-referencing relationship. This column typically contains the primary key value of the parent member, or the nullParentValue for root members. The column enables the recursive traversal that defines the hierarchy structure. | ||||
level | Level🔗 | 0 | 1 | false |
Single level definition that applies to all members in this parent-child hierarchy. Unlike explicit hierarchies with multiple levels, parent-child hierarchies use one level definition that describes the properties and behavior of all members regardless of their position in the tree structure. |