MSBA-261 · Lesson 1 of 12 · 20 min

Star schema design

▶ Video coming soon A video version of this lesson is on the way.

By the middle of October 2026, Kwabena Asante-Lowe had clean data. As the institutional research analyst for Lumenvale Community Colleges, the three-campus college system in Kelowna, he had spent the first half of the fall term in Power Query, connecting to the student records database, combining the weekly sales files from the campus bookstores and cafés, and turning a dozen untidy sources into tidy, refreshable queries. That work is the subject of the companion course on preparing data with Power Query. Clean queries, though, are only the raw material. The next question was how to arrange them into a semantic model that deans, campus coordinators and the finance office could trust and query for years.

Rupert Ellingsworth, the college's IT governance lead, put the question bluntly at the Tuesday clinic. "Last year we had nine Power BI files that each answered one question and disagreed with each other about enrolment," he said. "I want one model, built properly, that every enrolment report uses." This course follows Kwabena as he builds that model: the Lumenvale Enrolment and Revenue model. Along the way it covers everything the modeling domain of the PL-300 exam asks of a Power BI data analyst, and the habits that make models fast and correct in practice.

What a semantic model is

A semantic model is the layer in Power BI that holds tables, relationships, calculations and security, and that reports query. It used to be called a dataset, and older documentation, menus and exam questions sometimes still use that word. When a report visual shows total tuition by campus, the visual does not read files or databases itself. It sends a query to the semantic model, and the model answers using the data it has imported, or by passing the query on to the source in DirectQuery or Direct Lake mode.

The model is where meaning lives. A database column called TUIT_AMT_NET becomes a measure called Net Tuition with a currency format and a description. A rule that "enrolment counts exclude withdrawn registrations" is written once, as a measure, instead of being rebuilt in every report. Because many reports can connect to one shared model, the model's design decides whether the college gets one version of the truth or nine.

Facts and dimensions

Most good Power BI models follow the star schema, a design that comes from data warehousing. A star schema divides tables into two kinds.

A fact table records events or measurements. Each row is something that happened: a student registered in a course section, a café sold a coffee, a tutor ran a session. Fact tables are usually long and narrow. They hold numeric columns that will be added up or averaged, such as credits, tuition or quantity, and key columns that point to the things involved in the event.

A dimension table describes those things. The Campus table has one row per campus with its name, region and opening year. The Program table has one row per program with its school, credential type and length. Dimensions are usually short and wide, and their columns are what report readers filter, slice and group by.

A central table labelled Registration fact, with key columns and numeric columns, surrounded by five dimension tables: Date, Campus, Program, Course Section and Student. Each dimension connects to the fact table with a line marked one at the dimension end and many at the fact end.
The heart of the Lumenvale Enrolment and Revenue model. Dimensions sit around one fact table, which gives the design its star shape.

Laid out in the model view, the fact table sits in the middle and the dimensions around it, and the diagram looks like a star. The shape is not decoration. It is what lets the Power BI engine filter quickly: a slicer on Campus filters the Campus table, the relationship carries that filter to the fact table, and the measure adds up only the matching rows.

The grain of a fact table

The single most important design decision for a fact table is its grain: what exactly one row represents. Kwabena wrote the grain at the top of his design document before he built anything: "one row per student per course section per term, as of the nightly extract". Every other decision follows from that sentence. Tuition belongs at that grain because it is charged per registration. A student's grade point average does not, because it describes the student across all sections, so it belongs on a student-level table or in a separate fact.

Mixing grains in one table is a common way to produce wrong totals. If a program's annual budget were copied onto every registration row, adding up the column would multiply the budget by the number of registrations. When two kinds of numbers have different grains, they belong in different fact tables that share dimensions.

Fact tableGrain (one row is...)Numeric columnsDimensions it uses
RegistrationOne student in one course section in one termCredits, gross tuition, discounts, net tuitionDate, Campus, Program, Course Section, Student
Outlet SalesOne product line on one sales receiptQuantity, sales amount, cost amountDate, Campus, Outlet, Product Category
Program BudgetOne program in one fiscal monthBudgeted seats, budgeted revenueDate (month), Program
Bookstore StockOne product category at one outlet at month endUnits on hand, stock valueDate (month end), Outlet, Product Category

Shared, or conformed, dimensions

Notice that Date and Campus appear for several fact tables. A dimension used by more than one fact table is called a conformed dimension, and it is what lets one report compare enrolment with bookstore sales by campus and month. If the Registration table used a campus called "Lakeshore Campus" and the outlet files used "LKS", a single Campus slicer could not filter both. Kwabena's Power Query work had already mapped every source to the same campus codes, which is exactly why that preparation matters: dimension tables can only be shared if their keys agree.

Star or snowflake?

A snowflake schema normalizes dimensions further, splitting them into chains of tables. Instead of one Program table with a School column, a snowflake keeps a Program table that relates to a School table, which relates to a Faculty table. Databases often store data this way because it avoids repeating the school name on every program row.

Left panel labelled Snowflake: Registration links to Program, which links to School, which links to Faculty, in a chain. Right panel labelled Star: Registration links to a single Program table that contains program, school and faculty columns.
Flattening a snowflake. One wider Program dimension is easier for report authors and usually faster than a chain of small tables.

For Power BI, Microsoft's guidance is to prefer the star. Each extra relationship in a chain adds work when filters travel, adds tables that readers must understand, and makes it easier to end up with ambiguous filter paths. Repeating a school name on 34 program rows costs almost nothing in an imported model, because the engine compresses repeated values very efficiently. So Kwabena merged School and Faculty into the Program query in Power Query, producing one Program dimension with columns for program, school and faculty.

Snowflakes are not forbidden. A very large dimension that genuinely has a separate parent level, or a dimension that must relate to fact tables at two different grains, can justify an extra table. The rule of thumb is to flatten unless there is a clear reason not to.

Keys

Relationships in Power BI join one column in each table. In a star schema, the dimension's column is its key, which must be unique, and the fact table holds a matching column for each dimension it uses. Kwabena's dimensions used the source system's stable codes as keys: campus codes DTN, LKS and RDG for Downtown, Lakeshore and Ridgeview, program codes from the student system, and an integer DateKey in the form 20261015.

Two kinds of key deserve a moment. A natural key, or business key, comes from the source system, such as a program code. A surrogate key is a meaningless number assigned in a data warehouse to identify a dimension row, often to track changes over time. Power BI models built on a warehouse usually relate on surrogate keys; models built straight from operational systems usually relate on natural keys. Either works, provided the key is unique on the dimension side and present on the fact side.

Keys should also be as narrow as possible. Whole numbers compress and join faster than long text, so where the source offered both a numeric identifier and a text code, Kwabena kept the number for the relationship and the code as a visible attribute.

Flat tables and why they cause trouble

Many first Power BI files are built on a single flat table exported from a system, with every attribute repeated on every row. The tutoring report in the previous course started that way. Flat tables work for small, single-purpose reports, but they break down as a model grows. A second fact table cannot share the flat table's attributes, measures become harder to write because everything sits in one place, and the file grows because wide text columns repeat on millions of rows.

Kwabena's rule for the new model was simple: no wide fact tables. Every descriptive attribute lived on a dimension, and the fact tables held only keys and numbers. A degenerate dimension, such as a receipt number that has no attributes of its own, can stay on the fact table, since there is nothing to move to a dimension.

Table and column properties

The PL-300 study guide asks candidates to configure table and column properties, and this is where a model starts to feel finished. In the model view, each table and column has properties in the Properties pane.

PropertyWhat it doesExample in the Lumenvale model
Name and descriptionThe name readers see, and a tooltip and documentation noteNet Tuition: "Tuition after discounts and waivers, excluding withdrawals"
Data type and formatHow values are stored and displayedNet Tuition as fixed decimal with currency format
Summarize byThe default aggregation when a column is dragged into a visualCredits set to Sum; Program Year set to None
Data categoryTells visuals what a column meansCampus City categorized as City for map visuals
Sort by columnSorts one column by anotherMonth Name sorted by Month Number
HiddenHides keys and helper columns from report authorsAll key columns hidden
Display folderGroups fields in the Data paneMeasures grouped as Registration, Revenue and Outlets
SynonymsAlternative names that help Copilot and natural-language features find fieldsHeadcount also known as students enrolled

Hiding keys matters more than it seems. If the CampusCode column on the fact table stays visible, a report author may drag it into a slicer instead of the Campus dimension's name, and that slicer will not filter the Outlet Sales table. Hiding fact-table keys leaves only one obvious way to filter: through the dimension.

Descriptions and synonyms have taken on a second job. Copilot in Power BI and the prepare data for AI settings read the model's names, descriptions and synonyms to understand what fields mean. A model with clear names and descriptions gives readers and Copilot better answers; a model full of columns called Col7 gives neither.

Measure tables and naming

Measures belong to a home table, which affects only where they appear in the Data pane. Many teams create a dedicated, otherwise empty table to hold measures so that they are easy to find. Kwabena created one called Measures, and used display folders inside it. He also agreed naming rules with Rupert: names in plain words with spaces, no abbreviations a dean would not understand, and units in the name when they help, such as Credits per Student.

Worked problem

Finding the grain

The finance office sends Kwabena a monthly file with one row per program per month, giving budgeted seats and budgeted revenue. Should he add these columns to the Registration fact table?

Show solution
  1. State the grain of each table: Registration is one student per course section per term; the budget file is one program per fiscal month.
  2. The grains differ, so copying budget values onto enrolment rows would repeat each budget figure once per registration.
  3. Create a separate Program Budget fact table at program-by-month grain.
  4. Relate it to the shared Program dimension and to the Date dimension (at month level), so one report can compare budget with actual enrolment.

Answer: No. Load the budget as its own fact table at program-by-month grain and relate it to the shared Program and Date dimensions.

Designing on paper first

Before he opened Power BI Desktop, Kwabena drew the model on a whiteboard in the institutional research office with Maribeth Ferreira-Quon, who owns the registrar's enrolment data, and Signe Tavernier-Mbeki, one of the college's two professional developers. They listed the questions the deans had asked over the past year, such as "How many full-time-equivalent students do we have by program this term compared with last fall?" and "Which outlets lose money in the summer?". For each question they wrote down which numbers it needed and how readers would slice it. The numbers became fact-table columns and measures; the slicing words became dimensions.

This exercise, sometimes called a bus matrix, lists business processes as rows and dimensions as columns, and marks which dimensions each process uses. It took forty minutes and saved weeks. When Maribeth mentioned that the deans also wanted to see enrolment by the date students registered as well as by term start date, the team knew before building anything that the Date dimension would need two relationships to Registration, a design problem the next lesson takes up.

Common mistakes

  • MistakeBuilding every report on one wide, flat export with descriptive columns repeated on every row.

    InsteadSeparate facts from dimensions, keep descriptive attributes on dimensions, and keep fact tables to keys and numbers.

  • MistakeAdding a column at a different grain to a fact table, such as a monthly budget on every registration row.

    InsteadWrite down each fact table's grain and give numbers at a different grain their own fact table.

  • MistakeKeeping a long snowflake chain of small dimension tables copied from the source database.

    InsteadFlatten related dimension levels into one dimension in Power Query unless there is a clear reason not to.

  • MistakeLeaving key columns visible so authors slice by fact-table keys.

    InsteadHide keys and let readers filter through dimension columns, which reach every related fact table.

Summary and key terms

  • A semantic model holds the tables, relationships, measures and security that reports query; it was formerly called a dataset.
  • Star schemas separate fact tables, which record events and numbers, from dimension tables, which describe the things involved.
  • Every fact table needs a clearly stated grain, and numbers at a different grain belong in a different fact table.
  • Conformed dimensions shared by several fact tables let one slicer filter them all.
  • Prefer a flattened star to a snowflake; repeated values compress well in imported models.
  • Dimension keys must be unique; narrow numeric keys join and compress best.
  • Table and column properties, such as descriptions, formats, sort by column, data categories and hidden keys, make the model usable for people and for Copilot.
Semantic model
The Power BI layer of tables, relationships, measures and security that reports query; formerly called a dataset.
Fact table
A table whose rows record events or measurements, with numeric columns and keys to dimensions.
Dimension table
A table that describes the people, places, things or times involved in facts.
Grain
What exactly one row of a fact table represents.
Star schema
A design with fact tables related directly to surrounding dimension tables.
Snowflake schema
A design in which dimensions are split into chains of related tables.
Conformed dimension
A dimension shared by more than one fact table, such as Date or Campus.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. State the grain of a fact table that records each café sale line.

    Show answer

    One product line on one sales receipt.

  2. Why should the CampusCode column on a fact table be hidden?

    Show answer

    So authors filter through the Campus dimension, which reaches every related fact table, rather than through a key that filters only one table.

  3. Give one reason to flatten Program, School and Faculty into one table.

    Show answer

    Fewer relationships for filters to travel, a simpler Data pane for authors, and little storage cost because repeated values compress well.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz