Parent-Child hierarchies
The concept of a Parent-Child hierarchy is commonly used in relational data modeling. A Parent-Child hierarchy is 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. This section explains Parent-Child hierarchies and their implementation 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:

Figure 10.44: A Parent-Child graph
We can represent the preceding graph in a data table, as shown in the following image:

Figure 10.45: Parent-Child graph representation in a data table
There is a one-to-many relationship between the ID and ParentID columns. In relational data modeling, we create a relationship between the ID and ParentID columns that turns the...