Ravindra BagaleCourses & study guides मराठी Track your progress

11. Data Modelling

11.3 Star Schema vs Snowflake Schema in Power BI with Example

Start with a problem

Raja's model chains Store, then City, then Region as separate tables. The Region slicer works, but the model is harder to explain and DAX gets longer.

Explain simply

A snowflake splits a dimension into a chain of tables. A star flattens it into one table per dimension around the fact. Power BI prefers the star.

Show the data

Snowflake level 1: Store

Store City ID
Kothrud C1
Baner C1
Gangapur C2
College Road C2
Rajarampuri C3

About this data: This table uses columns: Store, City ID. This table uses columns: City ID, City, Region. This table uses columns: Store, City, Region. This table uses columns: Model, Tables around Orders, Hops from Orders to Region. Values shown are the lesson examples already on this page (not a new dataset).

Snowflake level 2: City

City ID City Region
C1 Pune West Maharashtra
C2 Nashik North Maharashtra
C3 Kolhapur South Maharashtra

Fictional sample data. Practice file: visuals_orders_apr_may_2026.csv, dark_stores_maharashtra.csv (source: src/practice/).

Demonstrate

  1. Power Query › select Store › Home › Merge Queries › City on City ID › Join kind Left Outer › OK.

    Your result should look like this:

    Store rows
    5 (unchanged)
  2. Expand the City column › tick City and Region › remove City ID.

    Your result should look like this:

    Store City Region
    Kothrud Pune West Maharashtra
    Baner Pune West Maharashtra
    Gangapur Nashik North Maharashtra
    College Road Nashik North Maharashtra
    Rajarampuri Kolhapur South Maharashtra
  3. Right-click the City query › untick Enable load.

  4. Model view: keep one relationship, Store[Store] 1, then * Orders[Store].

Show the result

Your result should look like this (fictional sample):

Model Tables around Orders Hops from Orders to Region
Snowflake Store, City 2
Star Store (flattened) 1

Explain what happened

The merge copied City and Region onto each store, so the chain became one table. The numbers do not change (West ₹850, North ₹800, South ₹450), but there are fewer relationships to manage.

Explore further

  • Keep a snowflake only for a clear reason, for example a very large shared level used by several facts.

Detailed reference for this lesson:

Star schema vs snowflake schema in Power BI with example — in 30 seconds

What: A star schema has one fact table in the middle and one table per dimension around it.

Why: Fewer relationships. Simpler DAX. Faster reports.

Tiny example: Product, then Sub Category, then Category (3 tables) becomes one Product table.

First look at the data (before, then after):

Star schema vs snowflake schema in Power BI with example: before and after tables, fictional Blinkit Maharashtra data

Same before / after tables as text

Before — Product

Product ID Product Sub Cat ID
P-021 Gokul Milk 500 ml S1
P-041 Misal Masala S2

Before — Sub Category, then Category

Sub Cat ID Sub Category Category
S1 Milk Dairy & Breakfast
S2 Masala Snacks

Formula / click path

Power Query: Merge Product with Sub Category (Left Outer)
Expand Sub Category + Category · disable load on helper

After — One flat Product dimension (star)

Product ID Product Sub Category Category
P-021 Gokul Milk 500 ml Milk Dairy & Breakfast
P-041 Misal Masala Masala Snacks

Do it step by step:

  1. Select Product in Power Query.
  2. Home › Merge Queries with Sub Category on Sub Cat ID. Left Outer.
  3. Expand Sub Category and Category.
  4. Right-click the helper query › untick Enable load.
  5. In Model view you now see one Product table joined to Orders.

Star schema vs snowflake schema in Power BI with example — diagram, fictional data

Star schema: one central fact table directly connected to each dimension table. The diagram looks like a star (see Figure 1.2). This is the recommended design for Power BI.

Snowflake schema: dimensions are normalised into several related tables – for example Orders, then Product, then Sub Category, then Category. The chain of tables looks like a snowflake.

OrdersProduct ID
Amount
←
ProductProduct ID
Sub Category ID
←
Sub CategorySub Category ID
Category ID
←
CategoryCategory ID
Category Name
Figure 5.1 – A snowflaked Product dimension. Arrows show filter direction (from the "one" side to the "many" side).
Star schema Snowflake schema
Structure Denormalised dimensions (one table per dimension) Normalised dimensions (split into sub-tables)
Number of relationships Fewer More
DAX complexity Simpler Harder (filters travel through chains)
Performance in Power BI Generally better Generally slower
Model readability for users Easy – all product fields in one table Harder – fields spread across tables

Flatten snowflakes in Power Query

Now look at this: if the source is snowflaked, use Merge Queries in Power Query to bring Category and Sub Category into the Product table, then disable load for the helper tables. Result: a clean star schema (तारा रचना).

Star schema ha Power BI cha "golden rule" aahe. Lakshat theva: fact madhyabhagi, dimensions bajula.

Ravindra Bagale's Tip

Friends, many students keep a snowflake (Product, then Sub Category, then Category) because that is how the source delivered it. In Power BI, flatten it into one Product table in Power Query. Fewer relationships mean simpler DAX, easier hierarchies and faster reports. This matters for both exams and interviews.

Fix common mistakes

Wrong result Reason Correction
Region total drops after flattening Inner join dropped a store without a City Use Left Outer; check the row count stays 5
Store rows multiply after the merge City ID not unique in City Remove duplicates in the lookup first
Two City tables in the model Left load on after merging Disable load on the City query

Practise independently

Practice task

Flatten a product snowflake: SubCategory (Dairy, Snacks, Fruits), then Category group (Fresh = Dairy + Fruits, Packaged = Snacks). What are the totals by group in the practice orders?

Hints
  • Dairy ₹1,050, Snacks ₹650, Fruits ₹400.
Solution

Fresh ₹1,450 (Dairy ₹1,050 + Fruits ₹400); Packaged ₹650.

Think like a professional

Default to a star. If you keep a snowflake, write down why. The next developer will thank you.

Ravi Sir's Cards for this lesson

मराठी cards