Relationships with a many-many cardinality in Power BI Desktop

22-03-2019  0 Comment(s)

With the relationships with a many-many cardinality feature in Power BI Desktop, you can join tables that use a cardinality of Many to Many. You can more easily and intuitively create data models that contain two or more data sources. The relationships with a many-many cardinality feature is part of the larger composite models capabilities in Power BI Desktop.

What relationships with a many-many cardinalitysolves

Before the relationships with a many-many cardinality feature became available, the relationship between two tables was defined in Power BI. At least one of the table columns involved in the relationship had to contain unique values. Often, though, no columns contained unique values.

For example, two tables might have had a column labeled Country, but the values of Countryweren't unique in either table. To join such tables, it was necessary to create a workaround. One such workaround might be to introduce into the model additional tables with the necessary unique values. With the relationships with a many-many cardinality feature, you can join such tables directly by using a relationship with a cardinality of Many to-Many.

Use relationships with a many-many cardinality

When you define a relationship between two tables in Power BI, you must define the cardinality of the relationship. For example, the relationship between ProductSales and Product—using columns ProductSales[ProductCode] and Product[ProductCode]—would be defined as Many-1. We define the relationship in this way because there are many sales for each product, and the column in the Product table (ProductCode) is unique. When you define a relationship cardinality as Many-11-Many, or 1-1, Power BI validates it to help ensure that the cardinality that you select matches the actual data.

Comment Here


No Comments to Show