Foundations › Power BI › The Model: Build the Foundation
🧱 The Model: Build the FoundationStar Schema and Relationships: The Heart of the Model
Picture an invoice book (sales) next to a product list and a customer list. An invoice holds only the product number, and you look it up in the list to learn its name. That is exactly a Star Schema.
| Type | What it does | Example |
|---|---|---|
| Fact table | Records events and measurable values | FactSales: quantity, sales, cost |
| Dimension table | Describes events and is used to slice | DimProduct, DimCustomer, DimChannel, DimDate |
The usual relationship is one-to-many from the dimension (the 1 side) to the fact (the many side): one product has many sales. The filter flows from dimension to fact, so picking Electronics in a Slicer filters the sales automatically.
Build the model yourself
Drag the key from the fact table to the matching key in each dimension: ProductID, CustomerID, ChannelID and Date. Once all four exist the filters work.
Total Sales = SUM(FactSales[Sales])
Total Cost = SUM(FactSales[Cost])See how the dimension (product category) filtered the fact table through the relationship. Same measures, different numbers per category.
| Term | Meaning | Rule |
|---|---|---|
| Cardinality | Relationship type: one-to-many or many-to-many | Prefer one-to-many |
| Cross-filter direction | Which way filters flow: Single or Both | Start with Single from dimension to fact |
| Active/Inactive | Active or inactive relationship | One active relationship between two tables |
Advanced For advanced readers: why is many-to-many risky?
When both sides contain repeated values, a filter passes to groups of rows rather than one row, producing unexpected and sometimes inflated numbers. The usual fix: create a unique dimension table (like DimProduct) and link both tables to it.
Now here is a model with one broken relationship. Diagnose it: which relationship is wrong and why?
❓ The best shape for the relationship between DimProduct and FactSales is:
One product has many sales, so the relationship is one-to-many from dimension to fact.
Do it in real Power BI Desktop
- FactSales records events and Dim tables describe them.
- The usual relationship is one-to-many from dimension to fact, and filters flow that way.
- The dimension key must be unique; avoid Both and many-to-many without a reason.
- Test the relationship with a simple table before building the dashboard.
Need a real Power BI dashboard for your business?
I design a data model and an executive dashboard fitted to your business and your real data.