Define Dimensions in Multidimensional Modeling

Tip: Dimensions are fundamental to multidimensional analysis. They provide the context for your data, allowing users to slice and dice measures from various perspectives.

What are Dimensions?

In SQL Server Analysis Services (SSAS) multidimensional models, a dimension is a table that describes the business data. Dimensions contain attributes that categorize, filter, and group measures. Think of them as the "who," "what," "where," "when," and "how" of your business data.

For example, a Date dimension might contain attributes like Year, Quarter, Month, and Day. A Product dimension could have attributes like Category, Subcategory, and Product Name.

Key Components of a Dimension

Creating Dimensions

You typically create dimensions in SQL Server Data Tools (SSDT) by:

  1. Adding a new Dimension object to your Analysis Services project.
  2. Selecting the source table(s) from your data source view.
  3. Choosing the attributes that will form the dimension and its hierarchies.
  4. Configuring properties for attributes and hierarchies.

Example: Creating a 'Product' Dimension

Suppose you have a DimProduct table in your data warehouse with columns like ProductID, ProductName, ProductCategory, and ProductSubcategory.

To create a 'Product' dimension:

Dimension Properties

When defining a dimension, you'll configure various properties, including:

Property Description
Name The name of the dimension (e.g., 'Product').
Source Table The table in the data source view that provides the data for the dimension.
Key Columns The column(s) that uniquely identify members in the dimension.
Name Column The column used for displaying the member name.
Attribute Hierarchy Enabled Determines if hierarchies can be built from this dimension.
Members With Data Aggregation Specifies how to aggregate members with data.

Dimension Types

Analysis Services supports several dimension types, each with specific uses:

Important: Proper dimension design is crucial for query performance and usability. Avoid overly wide dimensions or excessively deep hierarchies.

Best Practices

By carefully defining your dimensions, you lay the groundwork for a powerful and intuitive multidimensional analysis solution in SQL Server Analysis Services.