MDX Introduction and Overview
MDX Introduction and Overview
CHAPTER
1
MDX Introduction and Overview
MDX Overview 1
Basic MDX and Cube Concepts 1
Dimensions 2
Hierarchies 2
Levels 2
Members and Measures 2
Additional MDX Concepts and Expressions - Tuples and Sets 2
Additional MDX Documentation 3
MDX Overview
Multidimensional Expressions (MDX) is a powerful syntax that enables you to query
multidimensional objects and provide commands that retrieve and manipulate
multidimensional data from those objects. MDX is designed to ease the process of
accessing data from multiple dimensions. It addresses the conceptual differences
between two-dimensional and multidimensional querying. MDX provides functionality
for creating and querying multidimensional structures called cubes with a full and
complete language of its own.
MDX is similar to the Structured Query Language (SQL), and MDX provides Data
Definition Language (DDL) syntax for managing data structures. However, its features
can be more complex and robust than SQLs features. The SAS 9.1 OLAP Server
technology uses MDX to create OLAP cubes and data queries. MDX is part of the
underlying foundation for the SAS 9.1 OLAP Server architecture, and it offers detailed
and efficient searches of multidimensional data.
With MDX, specific portions of data from a cube can be extracted and then further
manipulated for analysis. This allows for a thorough and flexible examination of SAS
OLAP cube data. Users of MDX can take advantage of such features as calculated
measures, numeric operations, and axis and slicer dimensions.
Dimensions
Dimensions are the top or highest categories of a cube. They contain subcategories of
data known as levels and measures. A dimension can have multiple hierarchies and
can be used in multiple cubes. A cube can have up to 64 dimensions.
Hierarchies
A dimension might be categorized into different hierarchies. For example, a company
might categorize its profit dimension along the verticals of geography, sales territory, or
market.
Levels
Levels are categories of organization within a dimension. Levels are hierarchical, and
each level that is descended in a dimension is a component of the previous level. For
example, a time dimension could include the following levels: Year, Quarter, Month,
Week, and Day.
member(s) from one or more dimensions. However, a tuple cannot be composed of more
than one member from the same dimension.
Sets are collections of tuples. The order of tuples in a set is important when querying
cube data and is known as dimensionality. It is important to note that the order of the
dimension members in every tuple must be the same. For example, if your first tuple is
(time_dimension_member, geography_dimension_member), then every other tuple in
that set must also have two members in it, the first from the time dimension and the
second from the geography dimension.