Skip to content
VirtualLP Virtual Learning Platform

Star Schemas, Grain and Relationships

8 min read Topic 10 of 38 2 hands-on labs

Understand it in simple language

A fact table stores events such as order lines; dimensions describe products, dates or regions. A star schema links each unique dimension key to many fact rows. Our Product dimension has two keys and Sales has four rows. Prefer single-direction filtering from dimension to fact unless a tested requirement needs otherwise.

Many-to-many and bidirectional relationships can make results hard to predict. A bridge table can represent memberships, but its grain and filter paths must be designed explicitly. Hiding technical keys and organizing measures helps report authors.

Do it step by step

Load clean Sales and Products. In Model view drag Products[ProductID] to Sales[ProductID]. Set one-to-many and Single direction, with Products on the one side. Put Products[Category] and a Revenue measure in a table. Verify category totals: Accessories 800, Devices 1500. Browser lab: Build the product relationship.

Check your result

If the one side is rejected, inspect Products for duplicate or null ProductID values.

If something goes wrong

Do not fix a duplicate dimension by switching automatically to many-to-many. Investigate its business key.

Practice data and learning method

Industry practice collection: downloadable retail, finance, HR and operations datasets, dictionaries, full walkthroughs and answer sheets. The cases contain multiple years, multiple related tables, deliberate data defects and known-answer checks. Progress from the small foundation files below to these cases; do not reuse the foundation totals for the larger datasets.

Download Sales.csv, Products.csv, and the dataset guide. These files contain synthetic training data, not real customers. Use the Power BI virtual labs for guided browser practice. Each lab states its supported operations. Then repeat the procedure above in the actual Microsoft tools and save evidence of your result. Try another filter or an intentionally incorrect setting and explain what changed before moving on.

Guided practicals for this topic

Virtual lab · Microsoft Power BI · 25 min

Build the product relationship

Guided browser practice with visible data, checked actions and expected results. Repeat the linked tutorial in Power BI Desktop.

Open lab

Virtual lab · Microsoft Power BI · 35 min

Build and validate a multi-table retail star

Hands-on retail case: load the downloadable CSV tables, perform the actions, inspect the full-data result and reconcile it. Includes a paired Desktop procedure.

Open lab

Continue learning from Microsoft

Power BI documentation · DAX reference · Power Query M reference · Power BI analyst skills map. Features, licensing, menus and availability can change; check the relevant official page for your environment.

Practise this topic

Hands-on virtual labs

Apply what you just read in a realistic, guided simulation. Free with a verified account.

Create a free account to track your progress and unlock virtual labs.