Ravindra BagaleCourses & study guides Track your progress

Guides

Star Schema Data Modelling in Power BI

A star schema puts one fact table (events and numbers) in the centre and dimension tables (Date, Store, Product) around it. Relationships on keys make filters and DAX behave. It is the default shape for clear Power BI models.

Friends! A flat sheet feels easy until City names repeat a thousand times. Why move to a star? Because filters and CALCULATE follow relationships. How? We draw FreshBasket Sales in the middle, Store / Product / Date around it, relate on IDs, and keep snowflake for later. Simple star first.

Quick answer

Vertical path:

  1. Fact = Sales lines with Amount + foreign keys.
  2. Dimensions = Date, Store, Product (labels and attributes).
  3. Model view: relate Sales[Store ID] → Store[Store ID] (many-to-one).
  4. Same idea for Date and Product.
  5. Hide key columns from report view.
  6. Prefer star over snowflake while learning.
Dimensions filter → Fact rows stay or leave → Measures sum what remains

Real example: shop star with the 190 total

Fact Sales:

SalesKey Date StoreID ProductID Amount
1 2025-01-10 S1 P1 100
2 2024-06-01 S1 P2 50
3 2025-02-01 S2 P1 40

Store dimension:

StoreID City Channel
S1 Mumbai Online
S2 Pune Online

Product dimension:

ProductID Name
P1 Rice
P2 Oil

What the star does when City slicer = Mumbai:

  1. Store dimension keeps S1.
  2. Relationship keeps Sales rows 1 and 2.
  3. Row 3 (Pune) leaves.
  4. [Total Sales] shows 150 (100+50).
  5. City name lived once on Store — not copied onto every fact row.

What do I need before this guide?

Before and after (look at the tables first)

Before star schema Flat sales sheet with repeated city.

Before

After star schema Fact and dimension tables in a star.

After

Draw the star

Star Center A star schema puts one fact table in the centre and dimension tables around it. Star Center A star schema puts one fact table in the centre and dimension tables around it.

A star schema puts one fact table in the centre and dimension tables around it.

Star Keys Relate fact to each dimension on a key (Store ID, Date, Product ID). Hide the key columns from report view. Star Keys Relate fact to each dimension on a key (Store ID, Date, Product ID). Hide the key columns from report view.

Relate fact to each dimension on a key (Store ID, Date, Product ID). Hide the key columns from report view.

  1. Fact in the centre — many rows.
  2. Dimensions around — fewer rows, rich labels.
  3. Many-to-one from fact to each dimension.
  4. Single filter direction (dimension → fact) for beginners.
  5. Hide IDs; show City, Product Name, Month.
Star Vs Snow Snowflake splits dimensions further. Prefer star for Power BI learning: simpler filters, clearer DAX. Star Vs Snow Snowflake splits dimensions further. Prefer star for Power BI learning: simpler filters, clearer DAX.

Snowflake splits dimensions further. Prefer star for Power BI learning: simpler filters, clearer DAX.

Snowflake splits Store into Store + City + State tables. Valid, but more joins and harder DAX for learners. Put City on Store until you must normalise.

Why flat files hurt later

  1. Renaming “Bombay” to “Mumbai” means rewriting every sales row.
  2. Date intelligence wants a continuous Date dimension.
  3. RELATED and clean slicers expect dimensions.

Mistakes and calm fixes

Symptom Likely cause Fix
Slicer does nothing Missing / inactive relationship Model view: create active many-to-one
Numbers duplicate Relationship wrong grain / many-many mishandled Fix keys; check cardinality
Authors use IDs Keys visible Hide keys in model
Over-normalised early Snowflake too soon Collapse attributes onto dimensions

Ravindra Bagale's Tip

Interview line: “I model a star: facts in the centre, dimensions around, many-to-one on keys, hide the keys from report view.” Got it?

Practice task

  1. Split a flat shop sheet into Sales + Store + Product.
  2. Relate on IDs.
  3. Slice City and prove totals 150 / 40.
  4. Hide StoreID.

Learn it properly

Course lessons:

Related: Fact and dimension · RELATED

Got it? Star schema = fact centre, dimensions around, keys relate them. Next: fact vs dimension tables in detail. Let us go ahead.

Frequently asked questions

What is a star schema?

A fact table in the middle related to dimension tables. The diagram looks like a star.

Star vs snowflake?

Snowflake normalises dimensions further (City → State tables). Star keeps attributes on the dimension for simpler DAX.

Why does modelling matter?

Filters and measures follow relationships. A messy model makes every CALCULATE harder.

Can I use one flat table?

For a tiny demo, yes. Real reports grow painful: repeated city names, weak date intelligence, slow changes.

Both directions on the relationship?

Beginners should keep single direction (dimension filters fact) unless a teacher asks for both.

Course lessons?

Why modelling matters, and star vs snowflake, in the data modelling chapter.