All writing

Why your Power BI model is slow (and what a star schema fixes)

Most slow reports are not a DAX problem. They are a modelling problem, and the fix is older than Power BI itself.

2 min read

The first thing people try when a report is slow is rewriting the DAX. Usually that is the wrong end of the problem. If the model underneath is a single wide table — or worse, a web of tables joined every which way — no amount of measure tuning will save it.

The shape you want

A star schema has one fact table in the middle and dimension tables around it, each joined once, one-to-many, filtering in a single direction.

TableKindGrain
SalesFactOne row per order line
DateDimensionOne row per day
CustomerDimensionOne row per customer
ProductDimensionOne row per product

That is the whole idea. Facts hold the numbers you aggregate; dimensions hold the things you slice by.

Why it is faster

The engine compresses columns, not rows. A narrow fact table of keys and measures compresses extremely well. A wide table repeating a customer's name and address on every order line does not.

A measure that behaves

Once the model is right, time intelligence stops fighting you:

Sales YTD =
CALCULATE (
    SUM ( Sales[Amount] ),
    DATESYTD ( 'Date'[Date] )
)

This only works if Date is a real date dimension marked as a date table, with one contiguous row per day. Half the "DATESYTD returns blank" questions come down to a date table with gaps in it.

What to do next

  1. Find the widest table in your model.
  2. Split the descriptive columns out into dimensions.
  3. Delete columns nobody uses. Most models carry a lot of them.
  4. Mark your date table as a date table.