Date Functions

Regardless of what other dimensions are in your data warehouse, it’s almost impossible to imagine an OLAP cube without some form of date dimensions. Most business users need to "slice and dice" key measures by month, quarter, year, and so on—and they also need to perform trend analysis by comparing measures over time. MDX provides several functions for business users to break out and analyze data by date dimensions. Let’s take a look at some of the most common date functions.

Before we get started with MDX date functions, let’s look at a basic example of the Children function against a specific date dimension member expression. For example, if you want to retrieve all the child data for FY 2004, you can issue the following query. ...

Get Smart Business Intelligence Solutions with Microsoft® SQL Server® 2008 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.