πWhy Data Modeling Matters in Power BI
Most slow reports, wrong totals and unreadable DAX have the same root cause: a weak data model. Power BI data modeling is the design of tables and relationships that the engine (VertiPaq) and DAX work on. Get it right and measures become short, visuals become fast, and new questions take minutes instead of days.
Microsoft's own guidance is clear: use a star schema. This guide shows what that means and how to build one. If you have not built a report yet, start with the Power BI tutorial for beginners.
πFact Tables and Dimension Tables
Fact tables record events or measurements: sales lines, transactions, attendance, tickets, stock movements. They are long (many rows), narrow, and mostly keys plus numbers.
Dimension tables describe the things involved: Date, Product, Customer, Store, Employee. They are short and wide, with descriptive text used for slicing and grouping.
πWhat Is a Star Schema?
A star schema puts one fact table in the centre with dimension tables around it, each related one to many to the fact. Draw it and it looks like a star.
Filters flow from dimensions to the fact. A slicer on Product[Category] filters Sales; a visual by Date[Month] groups Sales. Every measure is a simple aggregation of the fact.
Why star schema beats one flat table
Snowflake schema
A snowflake normalises dimensions further: Product links to Subcategory, which links to Category. It works, but adds relationships and slows filtering. In Power BI, flatten snowflakes into one dimension in Power Query using merges. See the Power Query tutorial.πRelationships: Cardinality and Filter Direction
Cardinality
Cross filter direction
Active and inactive relationships
Only one active path is allowed between two tables. When Sales has OrderDate and ShipDate, relate both to Date, keep one active, and use USERELATIONSHIP in a measure:Sales by Ship Date =CALCULATE ( [Total Sales], USERELATIONSHIP ( Sales[ShipDate], 'Date'[Date] ) )This is called a role-playing dimension. The alternative is to load Date twice as Order Date and Ship Date tables, which is clearer for report users.
πThe Date Table
Every serious model needs a dedicated date table:
Turn off Auto date/time in Options; it creates hidden date tables for every date column and bloats the model.
πHandling Common Modeling Problems
Different granularity
Budget is monthly by category; Sales is daily by product. Relate Budget to Date and Product at the right level (for example a Month column or a Category dimension), or allocate budget in Power Query.Many to many
Customers in multiple segments, or accounts with multiple owners, need a bridge table between the two dimensions. Keep relationships single direction from the dimensions to the bridge, and enable filtering through it deliberately.Header and detail facts
Order header (freight, discount) and order lines: flatten header attributes into the line table, or allocate header amounts across lines.Slowly changing dimensions
When a customer moves region, decide whether history follows the old or new region. Type 2 dimensions keep history with surrogate keys and valid from and valid to dates, typically managed upstream in SQL or Fabric.πModel Performance Checklist
Once the model is right, DAX becomes the easy part. Keep the DAX functions cheat sheet close.
πModeling Questions Interviewers Ask
More in our Power BI interview questions.
πFrequently Asked Questions
What is the best data model for Power BI?
A star schema: fact tables in the centre, denormalised dimension tables around them, one to many single direction relationships, and a marked date table.Is a flat table bad in Power BI?
For tiny datasets it works. As data grows, a flat table becomes slow, large and hard to extend with new facts like budgets.How many fact tables can a model have?
As many as needed. Facts share common (conformed) dimensions such as Date and Product.Should I build the star schema in SQL or Power Query?
Upstream in SQL or Fabric when possible, so many reports share it. Power Query is fine for smaller solutions.Is data modeling part of PL-300?
Yes, it is one of the most heavily weighted areas. See our PL-300 guide.πLearn It Live
Prakalpana's Power BI course is taught live online with an optional 1-on-1 track, where you design star schemas for real business scenarios and get your model reviewed by working BI developers. See the Power BI learning path, then WhatsApp or call +91 9180377502 for a free demo.