Power BI Data Modelling — Free Starter Lesson
Build a sales model you can verify
In this lesson you’ll build a simple star schema in Power BI Desktop and verify the totals with a sample dataset. You’ll need Power BI Desktop and a new report.
Watch the Power BI Modelling video.
1. Enter the sample data
Use Home → Enter data. Create Products with columns ProductID, Product and Category. Add P1, Desk, Furniture and P2, Lamp, Lighting. Create Sales with columns SaleID, ProductID, Quantity and UnitPrice. Add S1, P1, 1, 200; S2, P1, 2, 200; and S3, P2, 3, 40. Set Quantity and UnitPrice to numeric types.
2. Connect and calculate
In Model view, connect Products[ProductID] to Sales[ProductID] with a one-to-many relationship. Use single-direction filtering from Products to Sales and confirm that the relationship is active. Create this measure in Sales:
Sales Revenue = SUMX(Sales, Sales[Quantity] * Sales[UnitPrice])
Add a table visual with Products[Category] and the Sales Revenue measure. Add a card with Sales Revenue.
3. Check the numbers
Expect €600 for Furniture, €120 for Lighting and €720 overall. Filter to Lighting and verify that the card drops to €120. If each category repeats the €720 total, inspect the relationship and confirm that the visual uses Category from Products.
Practice exercise
Add S4, P2, 1, 40 to Sales. Before refreshing the visual, predict the new Lighting subtotal and grand total. Then compare your prediction with Power BI.
Self-check: Lighting should rise to €160, Furniture should stay at €600, and the grand total should be €760. Save the report and a short note explaining why filtering by category works.
Knowledge check
Try the full Power BI knowledge check
Open Learning Progress to mark this lesson complete or resume later.