My App
Data Modeling

Dimension Tables

Learn how Power BI dimension tables organize descriptive data for filtering, grouping, and analysis.

Dimension Tables

Dimension tables provide context for the data stored in fact tables.

While fact tables store business events and measurements, dimension tables describe the people, products, locations, and dates involved in those events.

A star schema typically contains:

              DimDate
                 |
                 |
DimCustomer --- FactSales --- DimProduct
                 |
                 |
              DimStore

The fact table answers:

What happened?

The dimension tables answer:

Who, what, where, and when did it happen?


What Is a Dimension Table?

A dimension table contains descriptive information used for:

  • Filtering reports
  • Grouping data
  • Creating hierarchies
  • Adding business context

Example:

DimProduct

ProductKey
ProductName
Category
Brand
Size

The dimension table does not contain transactions.

It describes the entities connected to transactions.


Dimension Table Structure

A typical dimension table contains:

  • A unique key column
  • Descriptive attributes
  • Business categories

Example:

DimProduct

ColumnDescription
<code>ProductKey</code>Unique product identifier
<code>ProductName</code>Product description
<code>Category</code>Product grouping
<code>Brand</code>Manufacturer

Example data:

ProductKeyProductNameCategoryBrand
1001All Terrain TireOff RoadBrand A
1002Highway TireCommercialBrand B

Common Dimension Tables

Most Power BI models contain several common dimensions.

Date Dimension

A date table supports time-based analysis.

Example:

DimDate

DateKey
Date
Year
Month
Quarter

Used for:

  • Year-to-date calculations
  • Monthly trends
  • Period comparisons
  • Time intelligence functions

Example:

Sales YTD =
TOTALYTD(
    [Total Sales],
    DimDate[Date]
)

Product Dimension

A product dimension describes items being analyzed.

Example:

DimProduct

ProductKey
ProductName
Category
Brand

Allows analysis by:

  • Product
  • Category
  • Brand
  • Product group

Example:

Category = "Off Road"

filters:

FactSales

Customer Dimension

A customer dimension stores customer attributes.

Example:

DimCustomer

CustomerKey
CustomerName
Region
Segment

Allows analysis such as:

  • Sales by region
  • Revenue by customer segment
  • Customer performance

Dimension Keys

Dimension tables require a unique key.

Example:

DimProduct

ProductKey | ProductName
-----------|------------
1001       | Tire A
1002       | Tire B

The key connects to the fact table:

DimProduct
     |
     | ProductKey
     |
FactSales

The fact table stores the key, not the description.

Example:

FactSales:

ProductKeyQuantity
10015
10013
10028

Why Not Store Everything in One Table?

A common beginner mistake is creating one large flat table.

Example:

SalesData

Date
Customer Name
Customer Region
Product
Category
Brand
Quantity
Sales Amount

Problems:

  • Duplicate information
  • Larger model size
  • More difficult maintenance
  • More complicated DAX
  • Poorer performance

Instead:

DimCustomer

Customer information


DimProduct

Product information


FactSales

Sales transactions

Each table has a clear responsibility.


Dimension Table Best Practices

Follow these guidelines:

Use Clear Names

Recommended:

DimDate
DimCustomer
DimProduct

Avoid:

Table1
Customer_Final
Product_New

Keep Attributes in Dimensions

Good:

DimProduct

Category
Brand
Size

Avoid:

FactSales

Category
Brand
Size

Create Reusable Dimensions

A shared dimension can support multiple fact tables.

Example:

             DimDate
                |
        ----------------
        |              |
    FactSales    FactInventory

The same date table can analyze multiple business processes.


Slowly Changing Dimensions

In enterprise models, dimension values can change over time.

Examples:

  • Customer changes region
  • Product changes category
  • Employee changes department

Slowly changing dimensions preserve historical information.

Learn more:

Slowly Changing Dimensions


Dimension Table Checklist

A good dimension table should:

  • Have a unique key
  • Contain descriptive attributes
  • Avoid transaction data
  • Support filtering and grouping
  • Connect to fact tables through relationships

Next Steps

Continue learning Power BI data modeling:

Advanced Topics:

On this page