The Art of Relationship: Exploring Cardinalities in Power BI
What is Cardinality?
Cardinality defines the relationship between two tables based on the number of unique values in a column.
Types of Cardinalities:
Basically Cardinalities are divided into four different types.
Let's discuss each cardinality type in detail.
One to One:
If one value in the first table is associating to maximum of only one value in the second table then such a kind of cardinality is known as "One to One."
In below example, each person in first table is associating with their individual passport.
One to Many:
If one value in the first table is associating to maximum of multiple values in the second table then such a kind of cardinality is known as "One to Many."
Recommended by LinkedIn
In below example, each COUNTRY in first table is having multiple states in second table.
Many to One:
If many values in the first table are associating to single value in the second table then such a kind of cardinality is known as "Many to One."
In below example, each COMPANY in second table is having multiple Employees in first table.
Many to Many:
One value in the first table is associating with multiple values in the second table and one value in the second table is associating with multiple values in the first table.
Hence for multiple values in the first table will be associating with multiple values in the second table then such a kind of cardinality is known as "Many to Many."
In below example, each Student in first table is associated with multiple courses in second table and vice-versa.
#cardinalities #powerbi #relationship
Data Scientist | Senior Recruiter
9mo#cfbr
Good Job! Nice article on cardinalitites!