Objective. Students construct a star-schema data model with at least one fact table and two dimension tables, define correct relationship cardinality and cross-filter direction, and explain why fan-out and many-to-many relationships cause incorrect aggregations.
This lesson, its worked examples and its practice questions has not yet been verified by an industry-certified professional or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.
VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.
A star schema is a data modeling pattern in which a central fact table connects to one or more dimension tables through foreign-key relationships. When you draw the model on paper, the fact table sits in the middle and the dimension tables radiate outward like points on a star. This layout is the foundation of analytical data models and is the pattern Power BI is optimized to work with.
The fact table stores measurable, numeric events — sales transactions, web-page views, sensor readings. Each row is one event. The fact table is usually wide (many rows) and contains foreign keys that point to the dimension tables.
Dimension tables store the descriptive context for those events — who, what, where, when. A Date dimension, a Product dimension, and a Customer dimension are classic examples. Dimension tables are usually narrow (fewer rows, more columns describing attributes).
A model with one fact table and two dimension tables already qualifies as a star schema. When a dimension itself connects to a second dimension, the structure is called a snowflake schema; Power BI handles both, but the pure star is preferred because it produces fewer joins at query time and is easier to maintain.
In Power BI Desktop, you connect tables by drawing a relationship line between matching key columns. Every relationship has two properties you must set deliberately: cardinality and cross-filter direction.
Cardinality describes how many rows on each side of the relationship match one row on the other side. The standard setting for a star schema is Many-to-One (\*:1): many rows in the fact table share one matching row in the dimension table. For example, thousands of sales rows might all reference the same Product ID that appears exactly once in the Product dimension. Power BI also supports One-to-One and Many-to-Many; those settings have specific, narrow uses described below.
Cross-filter direction controls which table can filter the other when a user interacts with a visual. In a standard star schema, set this to Single so that the dimension filters the fact table — never the reverse. Bidirectional filtering allows the fact table to filter the dimension as well, which seems convenient but frequently produces ambiguous filter paths and incorrect results, especially in models with more than two tables.
Fan-out happens when Power BI follows a relationship in a direction that multiplies rows unexpectedly. Imagine a Sales fact table linked to a Returns fact table through a Product dimension, with bidirectional filtering turned on. A filter placed on Sales can travel through Product and reach Returns, inflating or distorting the Return totals. The visual shows numbers that appear plausible but are mathematically wrong — one of the most dangerous data errors because it is silent. Always keep cross-filter direction on Single unless you have a specific, tested reason to change it, and document that reason.
A Many-to-Many (\:\) relationship arises when neither key column contains unique values. For example, a table of store locations and a table of product categories, where one store carries many categories and one category appears in many stores, form a true many-to-many. Power BI allows you to set this cardinality directly, but it does so through a hidden intermediate step that can produce duplicate counts in aggregations.
The safe, explicit solution is a bridge table (also called a junction table): a third table whose rows represent each unique store-category pair, with a foreign key to each side. The bridge table breaks the many-to-many into two Many-to-One relationships, which Power BI handles cleanly. Leaving an active many-to-many relationship without a bridge table is a model defect that will appear on the PL-300 exam and will cause real reporting errors in production.
1. Load your tables using Get Data or open the provided .pbix starter file.
2. Switch to Model view (the diagram icon on the left rail).
3. Drag the foreign-key column from the fact table onto the primary-key column of the dimension table. Power BI draws a relationship line and guesses cardinality.
4. Double-click each relationship line to open the Edit Relationship dialog. Verify that cardinality is Many to One (\*:1) and cross-filter direction is Single. Correct anything Power BI guessed incorrectly.
5. Confirm that dimension primary-key columns contain no duplicate values (use Column tools → Column quality in Power Query if in doubt).
6. Repeat for each dimension table until every foreign key in the fact table is connected.
After building the model, create an entity-relationship (ER) diagram in draw.io or Lucidchart. Label each table, mark primary keys (PK) and foreign keys (FK), use standard crow's-foot or UML notation for cardinality, and draw an arrow showing filter direction. Documentation is not optional: in a professional environment, undocumented models become unmaintainable. In this course, your ER diagram is part of the graded deliverable.
Data science has no electrical hazards that require lockout/tagout, but it has its own form of safety: data integrity. Incorrect relationship settings produce wrong aggregations that flow into dashboards, which then inform business decisions. Treat an unverified many-to-many relationship or an untested bidirectional filter the way a technician treats an unlocked energy source — do not leave it active until it is confirmed safe. Always validate totals in a simple visual (a card or table) against a known-correct source before publishing any report.
Answer each question, then check it. Nothing is recorded; this is your own practice.
A free tech program — complimentary, as our commitment to get America working. Help us build VoTechWorks. Tell us what works, what doesn’t, and what you want to learn.