SELF-GUIDED BA PRACTICE Selected editions available · Access after confirmed paymentCheck editions ↗

Dashboards & BI

Star schema explained: facts, dimensions and grain for business analysts

Dashboards & BI · Published · Updated · 10 min read · By BA Mentorship Editorial (AI-written)

Part of our guide to business analyst tools.

What a star schema is: facts in the middle, dimensions around them

A star schema is a simple data model designed for reporting rather than for running day-to-day transactions. It has two kinds of tables. When you draw it, one table sits in the middle and the others connect to it like the points of a star. That is where the name comes from.

Fact tables hold the measurements

A fact table records events from one business process: a sale, a payment, a support call, a delivery. Each row holds numbers you want to add up or average, called measures (quantity, amount, duration), plus keys that point to the dimension tables. Fact tables are usually long and narrow: many rows, few columns.

Dimension tables hold the context

A dimension table describes the who, what, where and when of each event. A product dimension holds product name, category and brand. A date dimension holds day, month, quarter and financial year. A store dimension holds store name, city and region. Dimension tables are usually short and wide: fewer rows, many descriptive columns.

The link between them is a key. Each dimension row has a unique key, and the fact table stores that key as a foreign key. In reports, dimensions become your filters, slicers and row labels. Facts become the numbers in the cells.

  • If you would sum, count or average it, it probably belongs in a fact table.
  • If you would filter, group or label by it, it probably belongs in a dimension.
  • If you cannot decide, ask what one row of the fact table means. That question leads you to grain.

Grain: decide what one row means before anything else

The grain is a one-sentence statement of what a single row in a fact table represents. For example: one row per product line on a till receipt, or one row per store per day, or one row per support ticket status change. Everything else in the design depends on it.

Grain decides which questions the data can answer. If the grain is one row per product line on a receipt, you can report sales by product, by hour, by till and by store. If the grain is one row per store per day, you can never see which products sold, because that detail was summed away before it reached the table.

Grain also protects you from double counting. Every measure in a fact table must be true at the declared grain. If you put a monthly store target on every receipt line, a report that sums the target will multiply it by the number of lines. This is one of the most common reporting bugs, and it starts as a modelling decision, not a dashboard error.

A good rule: pick the lowest sensible grain the source data supports. You can always add detail up into totals. You cannot split a total back into detail.

Why a star schema helps reporting

Operational systems store data in many small, linked tables so that each fact is saved once and updates are safe. That is good for running the business, but a simple question like sales by region by month might need joins across many tables. A single flat spreadsheet-style table goes the other way: easy to read, but heavy, repetitive and easy to break when a description changes.

A star schema sits in between. The benefits for reporting are practical:

  • Simpler queries. Each question needs one fact table and a few joins, which you can read and check yourself with basic SQL.
  • Consistent numbers. Measures are defined once, so two dashboards that use the same fact table should agree.
  • Better performance. BI tools such as Power BI are built to work well with this shape. Microsoft's star schema guidance explains why.
  • Reusable dimensions. One date or product dimension can serve several fact tables, so filters behave the same everywhere.
  • Easier conversations. Business people already think in numbers and descriptions, so the model maps directly to their questions.

Three ways to hold the same data

AspectOperational tablesOne flat tableStar schema
Main purposeRun daily transactions safelyQuick one-off analysisRepeatable reporting and dashboards
Joins needed for a reportMany, across linked tablesNoneA few, from the fact to each dimension
Repeated descriptionsVery littleA lot, on every rowStored once in each dimension
Risk when a name changesLowHigh, many rows to updateLow, change one dimension row
Ease for business usersHard to readEasy at first, messy as it growsEasy once the grain is clear
A star schema needs some design effort up front, but it gives reports that are simpler, faster and more consistent.

How to define a star schema as a business analyst

You will rarely build the tables yourself. Your job is to give the BI or data team a clear, tested specification. These steps work whether the team uses Power BI, another BI tool or a data warehouse.

  1. Start with the business questions. Collect the real questions the dashboard must answer, written in the stakeholder's words. Link each one to a KPI or a decision.
  2. Name one business process per fact table. Sales, returns, deliveries and targets are different processes. Each usually gets its own fact table.
  3. Declare the grain in one sentence. Write it at the top of the specification and ask the data team to confirm the source can deliver it.
  4. List the dimensions. For each fact table, ask who, what, where, when and how. Note the descriptive columns people will filter or group by.
  5. List the measures and how they add up. For each measure, say whether it can be summed across all dimensions, only some, or none (for example, a stock balance or a rate).
  6. Write sample rows and test them against the questions. A few made-up rows expose missing dimensions and grain problems faster than any diagram.
  7. Agree definitions and record decisions. Write down what each measure means and why the grain was chosen, for example in a decision log.
From business question to star schema7 steps in order: 1. Collect business questions: Write the questions in stakeholder language and link each to a KPI or decision. 2. Name the business process: Choose one process, such as sales or deliveries, for each fact table. 3. Declare the grain: State in one sentence what a single fact row represents. 4. Identify dimensions: Ask who, what, where, when and how for every event. 5. Define measures: List each number and whether it can be summed across all, some or no dimensions. 6. Test with sample rows: Walk a few made-up rows through every question to find gaps. 7. Record decisions: Document definitions and grain choices so the team builds the same thing.1Collect business questionsWrite the questions in stakeholderlanguage and link each to a KPI ordecision.2Name the business processChoose one process, such as sales ordeliveries, for each fact table.3Declare the grainState in one sentence what a single factrow represents.4Identify dimensionsAsk who, what, where, when and how forevery event.5Define measuresList each number and whether it can besummed across all, some or no dimensions.6Test with sample rowsWalk a few made-up rows through everyquestion to find gaps.7Record decisionsDocument definitions and grain choices sothe team builds the same thing.
Each step narrows the design. The grain step comes early because every later choice depends on it.
Diagram in words
  • 1. Collect business questions: Write the questions in stakeholder language and link each to a KPI or decision.
  • 2. Name the business process: Choose one process, such as sales or deliveries, for each fact table.
  • 3. Declare the grain: State in one sentence what a single fact row represents.
  • 4. Identify dimensions: Ask who, what, where, when and how for every event.
  • 5. Define measures: List each number and whether it can be summed across all, some or no dimensions.
  • 6. Test with sample rows: Walk a few made-up rows through every question to find gaps.
  • 7. Record decisions: Document definitions and grain choices so the team builds the same thing.

Worked example: a sales star schema at Marigold Grocers

Marigold Grocers is a fictional chain of neighbourhood grocery stores. Helena, the sponsor, wants a dashboard showing sales by store, product category and month. Nadia, the business analyst, writes the specification with you.

Business process: till sales. Grain: one row per product line on a till receipt. Dimensions: date, store, product. Measures: quantity and sales amount, both fully additive.

  • fact_sales: receipt_number, date_key, store_key, product_key, quantity, sales_amount
  • dim_date: date_key, full_date, month_name, quarter, financial_year
  • dim_store: store_key, store_name, city, region
  • dim_product: product_key, product_name, category, brand

Nadia writes three sample fact rows to test the design (shown with names instead of keys so they are easy to read):

TEXT

receipt  date     store   product  qty  sales_amount
1001     3 March  Pune    Milk     2    ₹120
1001     3 March  Pune    Bread    1    ₹40
1002     3 March  Nagpur  Milk     1    ₹60

Total sales for the day are ₹220 (₹120 + ₹40 + ₹60). Pune sold ₹160 and Nagpur sold ₹60. Milk sold ₹180 across both stores, from 3 units. Grouping by any dimension gives a sensible answer, so the grain works for Helena's questions.

Then Helena asks for sales against target. Targets are set per store per month, so they do not match the receipt-line grain.

Adding targets without breaking the grain

Marigold Grocers, a fictional grocery chain, during a requirements review for the new sales dashboard.

  1. Helena Project sponsor

    Can we just add a target column to the sales table? Pune's March target is ₹6,000.

  2. Nadia Business analyst

    If we put ₹6,000 on every receipt line, and Pune has 200 lines in March, the dashboard would show a target of ₹1,200,000.

  3. Helena Project sponsor

    That would be badly wrong. So what do we do?

  4. Nadia Business analyst

    We create a second fact table for targets, with one row per store per month. Both tables share the store and date dimensions.

  5. You The BA learner

    So the dashboard sums sales from one table and targets from the other, then compares them by store and month?

  6. Nadia Business analyst

    Exactly. Achievement is sales divided by target. If Pune sells ₹4,500 in March, that is 75% of its ₹6,000 target.

  7. You The BA learner

    And we calculate the 75% in the report instead of storing it, because percentages cannot be summed across stores.

The people and the company in this scene are fictional.

Mixing grains in one fact table multiplies the target. A separate fact table keeps both numbers correct.

Reading a star schema query

Monthly sales by region

SELECT s.region, d.month_name,

SUM(f.sales_amount) AS total_sales1

FROM fact_sales AS f2

JOIN dim_store AS s ON f.store_key = s.store_key3

JOIN dim_date AS d ON f.date_key = d.date_key3

WHERE d.financial_year = 'FY2025'4

GROUP BY s.region, d.month_name;5

  1. Measure from the fact. Sales amount is additive at the receipt-line grain, so SUM is safe across any dimension.
  2. One fact table. The query starts from a single business process, which keeps the meaning of the number clear.
  3. Join on keys. Each dimension joins to the fact through its key. One join per dimension, nothing more.
  4. Filter by dimension. Filters use descriptive columns from dimensions, never text copied into the fact table.
  5. Group by labels. Row labels in the report come from the dimensions, here region and month.
A typical report query on the Marigold model: one fact table, one join per dimension, grouped by dimension labels.

Common star schema modelling mistakes to catch early

Many reporting errors found in testing started as small modelling choices. These are the ones worth checking every time.

  • Mixing grains in one fact table. Line-level sales and monthly targets in the same table cause inflated totals. Give each grain its own fact table.
  • Never writing the grain down. If people describe one row differently, they will build different measures. Put the grain sentence at the top of the specification.
  • Storing rates and ratios as measures. Averages, percentages and margins cannot be summed. Store the parts (sales, target, cost) and calculate the ratio in the report, for example as a measure in Power BI.
  • Putting descriptions in the fact table. Product names or store cities on every fact row bloat the table and go out of date. Keep them in dimensions.
  • Forgetting history in dimensions. If a store moves to a new region, should last year's sales follow it or stay in the old region? Ask the business and document the rule.
  • Missing unknown members. If a fact row has no matching product, an inner join silently drops it. Ask for an unknown row in each dimension so totals still reconcile.
  • Building one giant flat table. It feels simpler at first, but every new question adds columns and duplicated text.
  • Splitting dimensions into many small tables. Over-normalising (often called snowflaking) brings back the join complexity the star was meant to remove.

Healthy versus risky modelling habits

Good habit

  • Declare the grain in one sentence and get it confirmed
  • Give each business process and grain its own fact table
  • Store the parts of a ratio and calculate it in the report
  • Agree how changes to dimension values over time are handled
  • Reconcile dashboard totals against a trusted source report

Risky habit

  • Start designing visuals before the grain is agreed
  • Add a monthly number to a line-level fact table
  • Sum a stored percentage or average
  • Copy names and descriptions onto every fact row
  • Assume an inner join keeps every fact row
Most of these checks need no code. They need clear questions and a written grain.

Quick review checklist before you sign off a model

Use this list when the BI team shares a model or a draft dashboard. You do not need to read the code to ask these questions.

  • Every fact table has a written grain sentence that the business understands.
  • Each measure is valid at that grain and its summing rule is documented.
  • Every business question maps to one fact table and named dimensions.
  • Dimension columns use business-friendly names that match the project glossary.
  • There is a plan for unknown or missing dimension values.
  • Rules for dimension changes over time are agreed and recorded.
  • Dashboard totals reconcile to a trusted source report for a sample period.

If you want to practise this end to end, the BA Lab includes a data and SQL stage and a dashboards stage where you define measures and check them against a fictional company's data.

Silent clip, about 12 seconds. BA Lab screen recording: defining a KPI in the dashboard builder. All data in it is fictional.

Frequently asked questions

Do business analysts need to build star schemas themselves?

Usually not. Data engineers or BI developers build the tables. The BA defines the business questions, the grain, the measures, the dimensions and the definitions, then checks that the result answers the questions and reconciles with trusted sources. Knowing the concepts makes those conversations much faster.

What is the difference between a star schema and a snowflake schema?

In a star schema each dimension is one table joined directly to the fact table. In a snowflake schema some dimensions are split into further linked tables, such as product linked to a separate category table. Snowflakes reduce some repetition but add joins, so many BI teams prefer stars for reporting.

Can one dimension be used by several fact tables?

Yes, and it is good practice. A shared date or store dimension, often called a conformed dimension, lets you compare sales, targets and returns side by side, with filters that behave the same way across all of them.

How do I find the right grain if stakeholders are unsure?

Ask for the most detailed question anyone is likely to ask, then check what the source system actually records. Choose the lowest level the source reliably supports. Write sample rows and walk stakeholders through them, because concrete rows are easier to react to than abstract definitions.

Is a star schema the same as a data warehouse?

No. A data warehouse is the overall store of integrated data for analysis. A star schema is one way of shaping tables inside it, or inside a BI tool model such as Power BI. Many warehouses contain several star schemas, one per business area.

This article was written by an AI system and published automatically after automated accuracy, safety and quality checks. All companies, people and numbers in the examples are fictional. BA Mentorship does not issue professional certifications and cannot guarantee any job or interview outcome. Spot an error? Email our support team and we will check and correct it.

Key terms in this article

Browse the full glossary

CHECK BEFORE CONTINUING

Keep your work safe