Star Schema in Power BI: The Data Model Explained

What a star schema is, why Power BI is built for it, fact vs dimension tables, filter direction, date tables, and a checklist to diagnose a broken data model.

Your report works. Then it gets slow. A total looks wrong when two slicers are used together. A slicer lists "Riyadh" eleven times. Time intelligence returns blank for no reason anyone can explain. And adding one innocent column breaks three visuals.

Almost nobody's first instinct is right about the cause. It is rarely the visuals, rarely DAX, and rarely the machine. It is the data model — the shape of the tables underneath and how they connect. Get that shape right and most of those problems never happen. Get it wrong and you spend months fighting symptoms.

The shape that works has a name: the star schema. This guide explains what it is, why Power BI is specifically built for it, and how to tell whether yours is right — in plain language, with no prior modelling background assumed.

The Problem: One Big Table

Nearly every Power BI report starts the same way. Somebody exports a spreadsheet where every row already contains everything — order id, date, customer name, customer city, product name, product category, quantity, price, store, total. It is readable, it is familiar, and it loads in one click.

The same data modelled two ways. The flat table repeats every description on every row; the star stores each one once.

Then it grows, and four things go wrong at once:

None of these are visible on day one. All of them are structural, which is why no amount of tuning the visuals fixes them.

The Fix: Facts and Dimensions

A star schema splits your data into exactly two kinds of table, and the whole discipline is knowing which is which.

A fact table holds the events — what happened. Sales transactions, stock movements, journal entries, support tickets. It is long, numeric, and grows forever. A dimension table holds the things you describe those events by — the products, customers, dates, stores. It is short, descriptive, and grows slowly.

Fact tableDimension table
ContainsEvents and measurementsDescriptions and attributes
RowsMillions, growing dailyHundreds or thousands, stable
Typical columnsKeys, quantities, amounts, datesOne key, plus names, categories, hierarchies
You use it forMeasures — SUM, COUNT, AVERAGESlicers, rows, columns, legends
ExampleSales, StockMovements, LedgerProduct, Customer, Date, Store

The practical test when you are unsure about a table: would you ever want to slice by this, or is it the thing being sliced? If it answers "which one", it is a dimension. If it answers "how many" or "how much", it is a fact.

One rule follows from this and it is the one people break most often: descriptive text belongs on the dimension, not on the fact. Product category does not live on the sales row. It lives on the product, and the sales row points at the product.

How Filters Actually Travel

Here is the mechanism that makes the whole thing work, and understanding it once removes a great deal of confusion.

Dimensions filter the fact table. The relationship is one-to-many, and it points one way.

Each dimension sits on the "one" side — one row per product, one row per day. The fact table sits on the "many" side — many sales rows per product, many per day. When you click "Fasteners" in a product slicer, the filter travels from the dimension down into the fact table and restricts which rows your measure sums. It never travels back up.

That single direction is a feature, not a limitation. It makes filter behaviour predictable: any dimension can filter any measure, and no two paths can disagree about the answer.

Which brings us to the most common self-inflicted wound in Power BI: setting a relationship to bidirectional because a slicer "wasn't working". It usually does make that one slicer behave — and it can quietly introduce ambiguity, where the engine has two possible routes to the same rows and the totals stop reconciling. Use bidirectional filtering deliberately and rarely. When a slicer misbehaves, the model is telling you something; the honest fix is nearly always a missing dimension, not a reversed arrow.

Star vs Snowflake

A snowflake normalises the dimension into a chain. Correct, tidy, and slower for every filter.

A snowflake schema splits dimensions further: instead of one Product table carrying name, subcategory and category, you get three tables chained together. It is what a normalised source database usually hands you, and it is not wrong — it is just optimised for a different job.

Databases normalise to avoid storing anything twice, because they are built for writing. Power BI's engine is built for reading, and it compresses repeated values so effectively that the storage saving barely matters. What does matter is that filtering by category now has to travel three relationships instead of one.

So the working rule: flatten descriptive attributes into a single dimension table unless you have a specific reason not to. Power Query is where you do that flattening — the beginner tour of Power Query covers the merge and expand steps, and the ETL guide covers where this fits in the wider pipeline.

The Date Table You Must Build

Of all the dimensions, one is non-negotiable, and skipping it causes more silent failures than anything else on this page.

Power BI's time intelligence functions — SAMEPERIODLASTYEAR, TOTALYTD, DATEADD — require a proper date table: one row per day, no gaps, covering whole years, and formally marked as a date table in the model. Without it they return blank or, worse, plausible-looking wrong numbers.

The date column inside your sales table cannot do this job, because it only contains days on which sales happened. If nothing shipped on a Friday, that Friday does not exist, and any calculation that walks a continuous calendar breaks.

Date =
VAR MinYear = YEAR ( MIN ( Sales[OrderDate] ) )
VAR MaxYear = YEAR ( MAX ( Sales[OrderDate] ) )
RETURN
ADDCOLUMNS (
    CALENDAR ( DATE ( MinYear, 1, 1 ), DATE ( MaxYear, 12, 31 ) ),
    "Year",         YEAR ( [Date] ),
    "Month Number", MONTH ( [Date] ),
    "Month",        FORMAT ( [Date], "MMM" ),
    "Quarter",      "Q" & QUARTER ( [Date] ),
    "Year Month",   FORMAT ( [Date], "YYYY-MM" )
)

Create it, relate it to every date on every fact table, then right-click the table and choose Mark as date table. That last step is the one people forget, and it is the one that makes year-over-year comparisons work — including the ones in an income statement dashboard and the month-end averaging behind inventory turnover.

Symptom to Cause: A Diagnostic Table

If your report already misbehaves, the fastest route to the cause is usually this:

What you seeWhat it usually means
A slicer lists the same value many timesThe slicer is built on a fact-table column instead of a dimension
Totals change or look wrong when two slicers combineA bidirectional relationship, or two paths between the same tables
Time intelligence returns blankNo date table, or it exists but was never marked as one
The file is enormous and refresh is slowHigh-cardinality text columns sitting on the fact table
Items with no activity disappear from filtersFiltering from the fact table rather than the dimension
Adding a column breaks existing visualsMeasures pointing at columns that moved or were renamed
Sales and Budget will not sit in one visualTwo fact tables with no shared dimensions between them

That last row deserves a note, because it is the moment most people give up on modelling and start writing lookup formulas. Two fact tables at different grains — daily sales and monthly budget — work perfectly well together provided they share dimensions. Point both at the same Date and Product tables, and a single visual can show actual against budget with no merging at all. Attempting the same thing with one flat table is where reports go to die.

What a Good Model Looks Like

A short checklist you can run against any file in about five minutes:

Seven checks. Most struggling reports fail three or four of them, and fixing those usually resolves a backlog of unrelated-looking bugs in one go.

Why This Is Also Why Template Edits Break

There is a commercial version of this same lesson. A well-built template arrives with the star schema already correct: dimensions separated, a marked date table, single-direction relationships, explicit measures. That is most of the invisible work in a dashboard, and it is precisely the part that is easy to damage.

When someone opens a template and pastes a wide export straight over the model, or deletes a dimension that "looked empty", or flips a relationship to make a slicer behave, the visuals break for reasons that have nothing to do with the visuals. Customizing a template without breaking the semantic model is the practical companion to this article, and connecting your own data explains the column-matching rule that keeps the model intact while the data changes underneath it.

Every Prime Levels template — from the CFO income statement dashboard to the inventory and warehouse dashboard — ships on this structure, which is why swapping the data does not require rebuilding the report. If the mapping from your source is awkward, Template Data Setup handles it.

Fixing a Flat Model You Already Have

You do not need to start over. The migration is mechanical:

Half a day on a medium report, and it pays for itself the first time somebody asks a question the old model could not answer.

The Short Version

Power BI is not a spreadsheet with charts. Its engine is built around one assumption: that your data arrives as facts surrounded by dimensions, connected one-to-many, filtered in one direction. Model it that way and the tool feels effortless. Model it as one wide table and you will spend your time fighting a design you never chose.

Fix the shape first. Everything downstream — the DAX, the visuals, the performance, the correctness — gets easier for free.


Reference: Understand star schema and the importance for Power BI and Create date tables in Power BI Desktop — Microsoft Learn. Diagrams are Prime Levels illustrations.

What is a star schema in Power BI?

It is a data model shape with one or more fact tables at the centre — holding the events you measure — surrounded by dimension tables holding the attributes you slice by, such as product, customer, date and store. Each dimension connects to the fact through a one-to-many, single-direction relationship.

What is the difference between a fact table and a dimension table?

A fact table records events and measurements: it is long, mostly numeric, and grows every day. A dimension table describes those events: it is short, mostly text, and stable. The practical test is whether the table answers "which one" (dimension) or "how many / how much" (fact).

Why is one flat table bad in Power BI?

Every description repeats on every row, so the file grows and refreshes slow down. Slicers built on fact columns show duplicates and hide items with no activity, time intelligence cannot work reliably without a continuous date table, and a second fact table such as budget has nowhere to go.

Star schema or snowflake schema — which should I use?

Star, in almost every case. A snowflake normalises dimensions into chains, which suits a write-optimised database but makes every filter travel more relationships. Power BI compresses repeated values so well that flattening descriptive attributes into one dimension table costs little and reads faster.

Do I really need a separate date table?

Yes. Time intelligence functions such as SAMEPERIODLASTYEAR, TOTALYTD and DATEADD require a continuous date table covering whole years with no gaps, formally marked as a date table. The date column inside a sales table only contains days when something happened, so any calculation walking a continuous calendar breaks.

When should I use a bidirectional relationship?

Rarely, and always deliberately. Setting a relationship bidirectional to make a slicer behave can introduce ambiguity, where the engine has two routes to the same rows and totals stop reconciling. A misbehaving slicer usually signals a missing dimension, which is the honest fix.

All Power BI Finance Dashboard Templates