Power BI Modeling
Star-shaped, filter-directionally correct
The Power BI model (Analysis Services tabular) is where relationships, hierarchies, measures and roles come together. A clean star-style model is the difference between a reliable platform and a house of cards.
What you will learn
- Design a star-shaped model in Model view
- Configure relationship cardinality and filter direction correctly
- Put measures and hierarchies in the model, not the report
What is this?
The Power BI model is a tabular (Analysis Services) in-memory model holding tables, relationships, hierarchies, calculated columns/measures and security roles. Best practice is a star/snowflake of dims around facts, with one-way filter propagation from dim to fact. The model — not the report — is the durable asset you publish.
Why do you need it?
- Relationships + filter direction determine every aggregate on every visual.
- A reused measure in the model stops 40 visuals from re-deriving 'revenue'.
- Star shapes make filter logic predictable and avoid ambiguity errors.
- Hierarchies and roles in the model serve the whole report gallery.
Mental model
A city's power grid
The Power BI model
Lines (relationships) carry current (filters) in one direction from stations (dimensions) to users (facts). Mis-wire the direction and whole districts flicker wrong. The grid is engineered once; every building (report) simply plugs in.
How it works
- Model view shows tables and relationship lines; you set cardinality (1:* etc.) and filter direction.
- One-way dim→fact filtering propagates slicers and filters predictably.
- Hierarchies (region → country → city) enable drill-down across visuals.
- Measures live in the model: DAX evident where context is applied.
- Roles in the model define row-level security for the service layer.
A star-shaped Power BI model with one-way filter flow.
Examples
What belongs in the model vs the report
-- MODEL side (measures):Revenue = SUMX(fact_orders, fact_orders[amount] * (1 - fact_orders[discount]))Orders = COUNTROWS(fact_orders)AOV = DIVIDE([Revenue], [Orders], 0) -- REPORT side: visuals just reference the measures and group by dims-- Revenue by region (dim_customer), by fiscal quarter (dim_date)The model owns definitions; the report owns layout. Same revenue everywhere, regardless of how many visuals reference it.
In production
- A finance dataset models fact_pnl with dim_date/dim_entity/dim_acct, one-way filtered; every report inherits consistent slicing.
- A sales model stores [Revenue], [Orders], [AOV] and roles per region, so dashboards never recalc.
- A star-shaped customer model uses role-playing date dims (order, ship, due) without ambiguity errors.
Best practices
- Keep the model star-shaped: facts + few conformed dims.
- One active relationship per dimension path; use inactive for alternate roles.
- Store measures in the model with clear names and documentation.
- Calibrate cardinality: avoid many-to-many except with explicit bridge tables.
Common mistakes
- Many-to-many relationships configured as 1:* causing ambiguous filters.
- Both-direction filtering creating slow, circular dependency behavior.
- No measures in the model — every visual re-implements the same logic.
- Deep snowflakes defeating the in-memory advantage.
Common issues
Slicer on 'region' filters unrelated tablesBidirectional filtering crossing unwanted paths
Revert to one-way dim→fact and route alternates via DAX (USERELATIONSHIP).
Distinct count doubled on cross-slicingSnapshot/dim relationship fan-out
Model the correct grain (bridge or fact-level membership).
Debugging tips
- Wrong aggregate → check relationship path and filter direction first.
- Ambiguity error → more than one active path; disable one or use a bridge.
- Slow model → inspect model size, cardinality and DAX; disable unused relationships.
Interview checkpoint
Hands-on lab
- Create facts + dims and relationships in the Power BI model view
- Wire one-way filter direction correctly
- Add a hierarchy and a model measure
Build a Star Model in Model View
40 min · advanced
Quick quiz
Best-practice filter direction in a Power BI star model is:
Measures should be defined once in the model rather than per-visual.