Dimensional Modeling: Facts and Dimensions

Build analytical models around measurable events and the context people use to analyze them.

BeginnerIntermediateExpert · 6 min read · Last updated:

In brief

Dimensional modeling organizes analytical data around business processes. A fact table records events or observations at a clearly declared grain; dimension tables provide descriptive context such as product, customer and date.

Beginner See how facts and dimensions answer questions

What is dimensional modeling?

Suppose a retailer wants to analyze sales by product, store and day. The measurable sales activity belongs in a fact table. The descriptive details people filter and group by belong in dimensions. This structure makes common questions easier to express and helps keep metric definitions consistent.

DateDay, month, year
ProductName, brand, category
StoreLocation, region
Fact: Sales order lineQuantity, net amount, keys to context
CustomerSegment, geography
PromotionOffer, campaign
ChannelStore, web, partner
Illustrative star-shaped analytical model. Each fact row refers to descriptive dimension context using keys.

What belongs in a fact table?

A fact table usually contains dimension keys and measurements or event indicators. Examples include quantity sold, extended price, shipment count, or a row that records an event without a numeric measure. Choose facts that match the declared grain and have a clear business interpretation.

What belongs in a dimension table?

Dimensions contain the descriptive context used to group, filter and label facts. A product dimension may include product name, brand, category and lifecycle status. A date dimension can expose calendar and fiscal attributes so reports use consistent time groupings.

Intermediate Declare grain and work through a sales example

Declare grain before choosing columns

Grain states exactly what one fact row represents. For this example: one row per product on one sales order line. Kimball Group's dimensional modeling guidance treats the grain declaration as a pivotal design decision and requires facts to remain consistent with that grain. [1]

At this grain, a row may contain order number, line number, product key, customer key, order date key, quantity, unit price and net line amount. An order with three products contributes three rows. Do not mix order-level totals into the same rows unless their additive behavior is understood; otherwise those totals can be counted repeatedly.

Design choiceSales exampleWhy it matters
Business processRetail saleSets the scope of the fact table
GrainOne product per order lineDefines what each record means
DimensionsDate, product, store, customer, channelProvides common analysis context
FactsQuantity, gross amount, discount, net amountMeasures the process at the declared grain
IdentifiersOrder ID and line numberSupports traceability and uniqueness checks

Choose facts that aggregate correctly

Quantity and net amount can usually be summed across order lines, although the business must define how returns, tax and discounts affect each measure. Unit price is generally not additive: summing prices across products or dates has little meaning. If users need an average price, define the numerator and denominator explicitly—for example, net sales divided by units.

Design tip

For each measure, document its unit, sign convention, currency, null behavior, aggregation rule and treatment of corrections. A column name alone is not a metric definition.

A practical design sequence

  1. Select one business process and the decisions it supports.
  2. Write the grain as a sentence and validate it with users.
  3. Identify dimensions that describe the grain.
  4. Choose facts that are valid at that grain and define their aggregation behavior.
  5. Define keys, unknown-member handling and history requirements.
  6. Test totals against source systems and business expectations.
  7. Publish metric definitions and ownership in the semantic layer.
Expert History, integration and failure cases

Handle changing dimension attributes

If a product changes category or a customer moves region, decide whether reports should show the current value or the value that was true when the event occurred. A type 1 overwrite keeps the latest value; a type 2 history creates a new dimension version with effective dates and a new surrogate key. The correct choice depends on the business question and audit requirements, not on a default rule.

Common mistakes

  • Combining rows at different grains in one fact table.
  • Declaring grain only after columns have already been selected.
  • Storing descriptive attributes in a fact table when they belong to a reusable dimension.
  • Summing non-additive measures such as balances or ratios without a defined method.
  • Changing a dimension's history policy without considering prior reports.
  • Building separate dimensions with inconsistent definitions for shared business concepts.

When to use dimensional modeling

Use it when people need understandable, repeatable analysis across business processes and dimensions. It is especially useful for BI and reporting. It does not replace operational models, event stores, canonical integration structures or specialized graph and document designs; many enterprise architectures use multiple models with clear contracts between them.

Review checklist

  • Can every fact row be explained in one sentence?
  • Do all facts match the declared grain?
  • Can users identify the dimensions they need to analyze the process?
  • Are additive, semi-additive and non-additive measures distinguished?
  • Are late-arriving data, corrections, unknown keys and history covered?
  • Can totals be reconciled and metrics traced to their definitions?

Sources and further reading

  1. Kimball Group, Grain and Fact Table Structure.
  2. Microsoft Learn, Understand star schema and the importance for Power BI. This is platform-specific guidance and is linked as an implementation reference, not a vendor-neutral standard.
Architecture and governance depth Examples, boundaries and review

Worked example: process and grain

Suppose a service organization wants to measure cases resolved by team and week. Decide whether one fact row represents each status change, each case, or a periodic case snapshot. A transaction fact can answer how many transitions occurred; a case-level fact can answer current resolution outcome; a snapshot can show open workload at a regular cutoff. The grain determines which questions can be answered without double counting.

Choose facts and dimensions

Facts record measurable events or states; dimensions provide descriptive context. A case-transition fact might include transition count and elapsed duration, with dimensions for case type, team, date and channel. If cases can move between teams, record the team at the transition or define an effective-dated relationship. A current team attribute may misstate historical responsibility.

Define aggregation and history

Counts and durations may be additive at the chosen grain, while resolution rates must be recalculated from numerator and denominator. Snapshot counts can be summed across teams at one point but not across dates as if each were a new case. State how late updates, reopened cases and corrections affect historical reports.

Validate dimensional joins

Check that each fact resolves to exactly the intended dimension version. A non-unique customer or team match can multiply measures. Test totals at detail and rolled-up levels, compare with source evidence, and include a case that changes team or status during the reporting window.

  • Is each fact grain written as a sentence?
  • Do dimensions describe the fact at that grain?
  • Are additive and non-additive measures distinguished?
  • Are historical relationships and late changes handled?
  • Do joins preserve counts and totals?