Understanding Parent-Child hierarchies
The concept of a Parent-Child hierarchy is commonly used in relational data modeling. We have a Parent-Child hierarchy when the values of two columns in a table represent hierarchical levels in the data. Parents have children; their children have children too, which creates a hierarchical graph. Let's continue with an example to understand Parent-Child hierarchies and implement them in relational data modeling. Then, we'll look at the Parent-Child design in Power BI. The following diagram shows a typical Parent-Child graph. Each node of the graph contains an ID
and the person's Name
:
We can represent the preceding graph in a data table, as shown in the following screenshot:
We can quickly discover that there is a one-to-many relationship between the ID and ParentID columns...