The Art of Relationship: Exploring Cardinalities in Power BI
SATYA NAGA VENKATA SAI KRISHNA TUMMIDI

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.

  • As we go further into this concept, While modelling the data, we need to know the exact relationship between two tables.
  • Power BI automatically identifies the exact relationship based on the cardinalities.
  • If you want to know the type of relationship between two tables then we need to identify the cardinality between two tables.

Types of Cardinalities:

Basically Cardinalities are divided into four different types.

  1. One to One
  2. One to Many
  3. Many to One
  4. Many to Many

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.

@Satya Naga Venkata Sai Krishna Tummidi

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."

In below example, each COUNTRY in first table is having multiple states in second table.

@Satya Naga Venkata Sai Krishna Tummidi

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.

@Satya Naga Venkata Sai Krishna Tummidi

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.

@Satya Naga Venkata Sai Krishna Tummidi


#cardinalities #powerbi #relationship

Satish Dhawan

Data Scientist | Senior Recruiter

9mo

#cfbr

Like
Reply

Good Job! Nice article on cardinalitites!

Like
Reply

To view or add a comment, sign in

Insights from the community

Others also viewed

Explore topics