What is cardinality in data modelling stuff in power bi
- User
What is cardinality in data modelling stuff in power bi
- Assistant
What is cardinality in data modelling stuff in power bi
In Power BI and data modeling in general, cardinality refers to the nature of the relationship between tables based on how the rows in one table relate to the rows in another table.
Cardinality defines the type of relationship between two tables by specifying how many instances of a row in one table correspond to instances of rows in another table.
Power BI uses several cardinality types when defining relationships:
One-to-One (1:1)
One-to-Many (1: or 1:N)*
Many-to-One (*:1 or N:1)
Many-to-Many (:)
If you have the following tables:
The relationship is one-to-many: One Customer has many Orders. So, this will be set as 1 (one, on Customers) to Many (on Orders) in Power BI relationship settings.
| Cardinality | Description | Example |
|---|---|---|
| One-to-One | One row relates to one row | Employee to Office |
| One-to-Many | One row relates to many rows | Customer to Orders |
| Many-to-One | Many rows relate to one row (inverse of 1:Many) | Orders to Customer |
| Many-to-Many | Many rows relate to many rows | Students to Courses |
Understanding and correctly setting cardinality in Power BI helps ensure your visualizations aggregate and filter data correctly.
Not yet included in a published release.