Using relationships
When modeling relational data, a relationship describes the connection between two tables. For instance, our example shows a relationship between the Customer table and the Sales table. A customer can have multiple sales transactions in the Sales table. To create a relationship between the Customer and Sales tables, we must link CustomerKey from the Customer table to CustomerKey from the Sales table. This linkage enables Power BI to understand that each row of data in the Customer table can have one or more related rows in the Sales table.
To create relationships between tables in Power BI Desktop, we can either use the Model view to drag a column from a table and drop it to the relevant column from the other table or click the Manage relationships button from the ribbon. The Manage relationships button appears in several places in the ribbon.
The following image shows the Manage relationship window:
Figure 8.31: Manage relationships window in...