How to use Parent Child Hierarchies. From Tips & Tricks June 2022
Sneak: How to use Parent Child Hierarchies
The Tips&Tricks Series is produced by the Customer Success Team. It highlights several easy to follow instructions and range from simple tasks to more advanced use cases.
How to use Parent Child Hierarchies
Parent child hierarchies are used to depict the hierarchical, iterative relationship between all members that appear in the same table, enabling a graphic portrayal of the relationships, and facilitating the aggregation of all members according to the hierarchical structure. Pyramid’s extensive support for parent-child hierarchies, delivers elegant reporting with full hierarchy expansion and collapse, and provides hierarchical accumulation, directly on supported data sources without requiring data ingestion or data source manipulation.
In model, we will create a data model that will reflect all levels in the financial structure, where we can define how these parent child relationships are structured so we can view how each level correctly rolls up within their hierarchy.
- Once you have connected to your data source, defined which tables/data to include, and have a data flow, click on Data Model to setup the parent child hierarchy
- Once you have connected to your data source, defined which tables/data to include, and have a data flow, click on Data Model to setup the parent child hierarchy
- Define the hierarchy, by first naming it and also switching type to Parent Child, Rollup type to Self and Children, which will also allow for the attribute selections to be defined in the various levels of the hierarchy
- Define Attribute Selections by selecting the element from the left to define the hierarchy levels
- Child Key: The Child Key is the column containing the unique identifiers of hierarchy’s attributes.
- Parent Key: The Parent Key is the column that lists unique identifier of the parent of each attribute.
- Caption: The Caption is the column that contains the names of each attribute in the hierarchy.
- Unary Operator: This options is enabled when the roll up type is set to Children or Self and Children. The Unary Operator determines how data in the fact table will be calculated. By default, the value for each measure will be added. But there may be attributes in the hierarchy whose value should not be added to the total, but subtracted from it, or not rolled up to the parent at all. If the hierarchy contains attributes that should not be added, you can add a ‘Unary Operator’ column. This column specifies the operator type for each attribute
- Click “Add” to add the hierarchy. Once its added, process the model which will update the data model with the latest data and hierarchy, which generates the metadata for each of the levels in the account hierarchy dimension.
- In Discover, within the dimensions panel, the hierarchical structure of the account hierarchy can be viewed and is available for use. The end-user can see the different levels, from parent, children and descendants.
The end user can collapse the structure, drill down, expand, and perform calculations: parent-child hierarchies, delivers elegant reporting with full hierarchy expansion, and provides hierarchical accumulation, directly on supported data sources without requiring data ingestion or data source manipulation.
If you have questions about these tips (or improvements) please let us know in a comment.
P.S. We will post previous Tip&Tricks as well as all new ones to keep this information active and available to all users.
Reply
Content aside
- 1 yr agoLast active
- 25Views