Skip to content

Conformed dimension

A dimension that means the same thing in every fact table that uses it: the same column names holding the same values. Conformed dimensions are what let results from separate fact tables be lined up in one report.

Also: conformed dimensions · shared dimension

On this page · 7 sections
  1. Definition
  2. Example
  3. Why it matters
  4. Common mistakes
  5. FAQ
  6. Go deeper
  7. Related terms

A conformed dimension is a dimension table, or a set of dimension attributes, defined once and reused by every fact table that needs it. In Ralph Kimball's terms, dimension tables conform when the attributes they share have the same column names and hold the same set of values. A category column that holds Footwear and Outerwear in one table must hold exactly those values in the other.

Conforming does not require one physical table. The simplest case is a single customer or date table joined to every fact. A second case is a smaller table made from a subset of the full one's rows or columns, which Kimball calls a shrunken rollup dimension: a forecast stored by month and category joins to a category table whose values match the category column of the product dimension.

The payoff is the drill-across query. Run one query per fact table, group each by the same conformed attribute, then join the result sets on that attribute. Sales and forecast, or shipments and returns, line up row by row because the labels are identical. Without conformed attributes, the same report needs a mapping table and someone to keep it current.

with actuals as (
  select p.category, sum(s.sales_amount) as actual_sales
  from fct_sales s
  join dim_products p on p.product_key = s.product_key
  group by p.category
),
forecast as (
  select c.category, sum(f.forecast_amount) as forecast_sales
  from fct_sales_forecast f
  join dim_product_categories c on c.category_key = f.category_key
  group by c.category
)
select
  a.category,
  a.actual_sales,
  f.forecast_sales,
  a.actual_sales - f.forecast_sales as variance
from actuals a
join forecast f on f.category = a.category
order by a.category
Drill across two fact tables at different grains. Sales are stored by product and the forecast by category; the rows line up because category holds the same values in both dimension tables. On the sample rows, Footwear is 200 over forecast and Outerwear is 200 under.
Why it matters

Conformed dimensions are how a warehouse built one business process at a time still behaves like one system. Each new fact table plugs into dimensions that already exist, so its numbers can sit beside every earlier fact from its first load.

They are also an agreement between people, not only a table design. Finance and marketing have to accept one definition of customer segment or product category before the column can be shared, and that conversation can take longer than the SQL.

Common mistakes
  • Sharing a column name without sharing its values. A region column that holds state groupings in one table and sales territories in another has the same name and does not conform.
  • Rebuilding the customer or product dimension separately inside each mart, so the copies drift apart as each team adds its own cleanup rules.
  • Joining the two fact tables to each other on the shared key instead of aggregating each one to the conformed attribute first.
FAQ
What is an example of a conformed dimension?
A date dimension is the usual example: orders, shipments, and payments all join to the same calendar table, so a month means the same thing in each. Customer and product dimensions are the other frequent cases. A dimension used by only one fact table is not wrong; it has not yet needed to conform to anything.
Does a conformed dimension have to be the same table?
No. Two tables conform if the attributes they share have the same names and the same values. A month table conforms to a daily date table, and a category table conforms to a product table, as long as the smaller one is a consistent subset of the larger. What cannot differ is the meaning of a shared column.
What is the difference between a conformed dimension and a role-playing dimension?
A conformed dimension is shared across different fact tables. A role-playing dimension is used more than once by the same fact table, such as a date table joined as both order date and ship date. The two overlap in practice: a date dimension can be conformed across the warehouse and also play several roles within one fact table.