What Is a Dimensional Model? Design Analytics with Fact and Dimension Tables
A dimensional model organizes measurable business events in **fact tables** and the information that describes and classifies those events in **dimension tables**, making analysis easier. Modeling should not start by naming tables. First decide which business event to represent and state, in one sentence, the level represented by each fact row: its **grain**. Mixing grains can produce misleading totals and comparisons.
What Is a Dimensional Model? Design Analytics with Fact and Dimension Tables
A dimensional model organizes measurable business events in fact tables and the information that describes and classifies those events in dimension tables, making analysis easier. Modeling should not start by naming tables. First decide which business event to represent and state, in one sentence, the level represented by each fact row: its grain. Mixing grains can produce misleading totals and comparisons.
Facts and dimensions
| Component | What it contains | Retail sales example |
|---|---|---|
| Fact table | Keys and measures for repeated events such as sales | Order-line row, quantity, net sales, product key, customer key, order-date key |
| Dimension table | Descriptive context for filtering and grouping events | Product name and family, customer region, calendar date and quarter |
Facts answer questions such as “how much?” or “how many?” Dimensions provide context such as “what?”, “who?”, “when?” and “where?”. Dimension attributes are usually used to filter and group; fact measures are summarized with appropriate operations such as sum, count, or average. Not every number can be added. A unit price or ratio may call for an average or a separate calculation, and inventory balances may not be safely summed across dates. Microsoft: Understand star schema and the importance for Power BI · Kimball: Fact Tables and Dimension Tables
Declare the grain first
The grain states what one row in a fact table represents: the most specific business event recorded. For example: “one product line sold on one order at one store.” That sentence guides which keys and measures belong in the table.
| Candidate field | Example placement | Why |
|---|---|---|
| Order-line ID | Fact table or fact identifier | Identifies one row |
| Order-date key | Fact foreign key and date dimension | Supports date analysis |
| Product key | Fact foreign key and product dimension | Enables product and family grouping |
| Quantity sold, net sales | Fact measures | Summarize the event |
| Product name, color, family | Product-dimension attributes | Describe, filter, and group |
To test the grain, ask questions that reveal differences in level: “Does one row represent a whole order, or one item on that order?” If order-level shipping is copied onto every item row, summing shipping can multiply it by the number of items. If order headers and line items have different grains, model them separately or specify an explicit allocation rule.
Likewise, combining daily sales and annual targets in one table can repeat the annual target on every daily row. Comparing daily values rolled up to a year with an annual target calls for facts at compatible grains, a separate target fact, or a clearly defined aggregation rule. Do not add values from different levels without a rule. Kimball: Fact Tables and Dimension Tables
Star schemas and relationships
In a typical star schema, a sales fact table sits in the center and dimensions such as date, product, and customer connect around it. Dimensions hold descriptive attributes needed for analysis; the fact holds their keys and the event’s measures. A common pattern is a one-to-many relationship: a unique key on the dimension side connects to many fact rows. When a BI model propagates dimension filters through the relationship, it can answer a query such as “net sales by product family.”
This does not mean every model must use one classic star shape or one relationship design. Alternatives include a snowflake, where product, subcategory, and category are separate related tables; a role-playing dimension, where one date dimension represents order date and ship date; and conformed dimensions shared by multiple facts. Choose the design by weighing data size, history tracking, query performance, usability, and tool constraints. Microsoft’s Power BI guidance says dimensions are suited to filtering and grouping and facts to summarization, while recognizing design trade-offs. Microsoft Fabric: Modeling Dimension Tables in Warehouse
A design sequence
**Choose a business process.** Bound the event represented by a fact, such as order sales, inventory snapshots, or web visits.
**Write the grain sentence.** Answer: “What does one fact row represent?”
**Identify measures.** List values measured for the event, such as quantity or sales, and decide how each can be aggregated.
**Ask “by what?”** Identify dimensions needed for filtering and grouping: date, product, customer, region, and so on.
**Define keys and relationships.** Check dimension-key uniqueness, fact foreign keys, data types, and how missing keys are handled.
**Validate grain and aggregation.** Reconcile to source totals; verify dimension filters select the intended facts and that combined filters produce the intended conditions.
**Decide history requirements.** Agree whether a past report should retain an earlier product category or customer region, or reclassify it using the current value.
In Power BI Desktop, use Model view to inspect relationships and cardinality. A common documented pattern is a one-to-many relationship that propagates filters from dimension to fact. Even when a relationship is detected automatically, verify key uniqueness, direction, and filter results. Data preparation and relationship behavior can vary by product and storage mode. Microsoft: Model relationships in Power BI Desktop
Questions to check the model
Can another person describe what one fact row means using the same sentence?
Is the grain consistent across all fact rows?
Have you separated measures from identifiers and status fields?
Do dimension attributes support the “by what?” questions users ask?
Are keys unique, and is there a plan for missing or late-arriving dimension rows?
Do relationship cardinality and filter direction match the intended model?
Do unit prices, ratios, or balances have aggregation rules that prevent invalid sums?
Is the history needed for past analysis preserved?
A dimensional model is not judged by table count alone. When event grain is consistent, dimensions support the questions users need, and relationships and aggregation can be validated, analysis becomes trustworthy and reusable.