TGViewer
Data Analytics Data Analytics @sqlspecialist ยท 111K subscribers
Post #3121 2.39K
๐Ÿš€ Data Analyst Roadmap โ€” Part 24

๐Ÿ“Š Power BI Level 3 โ€” Data Modeling & Relationships

Once your data is clean, the next step is to build a proper data model.

This is where you decide how your tables connect and how Power BI should understand your data.

๐Ÿ”น 1. What Is a Data Model?

A data model is the structure that connects your tables.

For example, you might have:

Sales

Order_ID

Customer_ID

Product_ID

Date

Sales

Quantity

Customers

Customer_ID

Customer_Name

Region

Products

Product_ID

Product_Name

Category

Date

Date

Month

Quarter

Year

These tables are connected through relationships.

๐Ÿ”น 2. Fact Table

A fact table contains business transactions and numerical values.

Example:

Sales

It may contain:

โ€ข Sales Amount

โ€ข Quantity

โ€ข Cost

โ€ข Profit

โ€ข Order ID

Think:

Fact = What happened?

๐Ÿ”น 3. Dimension Table

Dimension tables describe the facts.

Examples:

Customer โ†’ Who?

Product โ†’ What?

Date โ†’ When?

Region โ†’ Where?

For example:

Customer

Customer_ID

Customer_Name

Region

๐Ÿ”น 4. Star Schema

A common Power BI model looks like this:

Customers


Products โ”€โ”€โ”€โ”€ Sales โ”€โ”€โ”€โ”€ Date


Region


The fact table is in the middle and dimension tables surround it.

This is called a Star Schema.

๐Ÿ”น 5. Primary Key

A primary key uniquely identifies a record.

For example:

Customer_ID

101

102

103

Each ID identifies one customer.

๐Ÿ”น 6. Foreign Key

The Sales table can contain the same customer multiple times:

Customer_ID

101

101

102

101

103

Here, "Customer_ID" is used to connect Sales with Customers.

So:

Customers โ†’ Primary Key

Sales โ†’ Foreign Key

๐Ÿ”น 7. One-to-Many Relationship

The most common relationship in Power BI is:

One Customer โ†’ Many Sales

Customers              Sales
1 *
| |
Customer_ID โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Customer_ID


This is called a:

1 : * relationship

๐Ÿ”น 8. Why Relationships Matter

Suppose you select:

Region = West

Power BI needs to know which sales belong to customers from the West region.

The relationship allows the filter to travel from:

Customers

โ†“

Sales

Without a proper relationship, your visuals may show incorrect results.

๐Ÿ”น 9. Cardinality

Cardinality describes how records relate between two tables.

Common types:

1 : * โ†’ One-to-Many

1 : 1 โ†’ One-to-One

โ€ข : * โ†’ Many-to-Many

For most Power BI analytical models, 1-to-many relationships are the most common.

๐Ÿ”น 10. Many-to-Many Relationships

Many-to-many relationships can make models more complicated.

For example:

Customers โ†” Products

A customer can buy many products.

A product can be purchased by many customers.

Instead of directly connecting them in some cases, a bridge table can be used.

Customers

โ†“

Bridge Table

โ†“

Products

๐Ÿ”น 11. Date Table

A proper Date table is extremely important for Power BI.

It can contain:

Date

Day

Month

Month Number

Quarter

Year

Year-Month

For example:

Date       | Month   | Quarter | Year
01-Jan-26 | January | Q1 | 2026
02-Jan-26 | January | Q1 | 2026
  • โค 5
More from @sqlspecialist
  1. Oct 4, 20269๏ธโƒฃ How would you calculate month-over-month growth? Sample Answer: โ€œI would first retrievโ€ฆ
  2. Oct 4, 2026๐Ÿ“Š Data Analyst Interview Series โ€” Part 3 Guys, let's continue our Data Analyst Interviewโ€ฆ
  3. Sep 29, 2026๐Ÿ”Ÿ How would you find duplicate records in SQL? Sample Answer: "I would first identify theโ€ฆ
  4. Sep 29, 2026๐Ÿ“Š Data Analyst Interview Series โ€” Part 2 Guys, let's continue our Data Analyst Interviewโ€ฆ
  5. Sep 29, 2026๐—™๐—ฅ๐—˜๐—˜ ๐—ฅ๐—ฒ๐˜€๐—ผ๐˜‚๐—ฟ๐—ฐ๐—ฒ๐˜€ ๐—ง๐—ผ ๐—Ÿ๐—ฒ๐—ฎ๐—ฟ๐—ป ๐—”๐—œ ๐—ถ๐—ป ๐Ÿฎ๐Ÿฌ๐Ÿฎ๐Ÿฒ๐Ÿš€ โ€‹ Explore 6 free resourceโ€ฆ
  6. Sep 29, 2026"After identifying duplicates, I investigate whether they are genuine duplicate records orโ€ฆ
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook โ†’Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 โ†’