Database Journal
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Tips Database Forum Rss Feed

» Database Journal Home
» Database Articles
» Database Tutorials
MS Access
SQL Scripts & Samples
» Database Forum
» Slideshows
Free Newsletters:

News Via RSS Feed

Rss Feed

Database Journal |DBA Support |SQLCourse |SQLCourse2

Featured Database Articles


Posted Mar 12, 2007

Mastering Enterprise BI: Time Intelligence Pt. II - Page 3

By William Pearson

Add Time Intelligence with the Business Intelligence Wizard

We will return to the Solution Explorer, from which we will launch the Business Intelligence Wizard.

1.  Within the Solution Explorer, expand the Cubes folder, as required.

2.  Right-click Adventure Works.cube within the folder.

3.  Select Add Business Intelligence... from the context menu that appears, as depicted in Illustration 11.

Illustration 11: Select Add Business Intelligence ...

The Welcome to the Business Intelligence Wizard page appears, as shown in Illustration 12.

4.  Click Next.

Illustration 12: The Welcome to the Business Intelligence Wizard Page Appears

The Choose Enhancement page next appears. Here we instruct the Business Intelligence Wizard to add Time Intelligence to our cube.

5.  Ensure that the top item in the Available enhancements list, Define time intelligence, is selected, as depicted in Illustration 13.

Illustration 13: The Choose Enhancement Page with Our Selection

6.  Click Next.

The Choose Target Hierarchy and Calculations page appears. As we noted in our introduction, we have several items to consider before and during our implementation of Time Intelligence through the mechanism of the Business Intelligence Wizard. Some of those considerations confront us here, where we must indicate the target Time Hierarchy, as well as which Calculations to generate.

7.  Click the downward pointing arrow on the right side of the selector labeled Use the following hierarchy to analyze time calculations.

8.  Click-select the Calendar item (second from the top) under the Date dimension (expanded at the top of the selection list that appears), as shown in Illustration 14.

Illustration 14: Hierarchy Selection atop the Choose Target Hierarchy and Calculations Page

While we would typically do as we have done here, and select multi-level hierarchies (so that we can provide relative time aggregations at multiple time levels), we can see that we have other options to more precisely fit our business needs. We also select the specific calculations we want to create, which we will accomplish in the next steps.

NOTE: We will need to execute the Time Intelligence creation steps individually for each hierarchy. As an example, say we wanted to perform these steps for the Fiscal hierarchy, in addition to the Calendar hierarchy with which we are working at present, should business requirements dictate that we generate calculations for multiple hierarchies.

9.  Click OK to accept the choice of Calendar hierarchy.

10.  Within the Available time calculations selection list, just below the hierarchy selector, place a check in the checkbox to the immediate left of each of the following calculation selections:

  • Year to Date
  • Semester to Date
  • Quarter to Date
  • Month to Date
  • Twelve Months to Date
  • Twelve Month Moving Average
  • Six Month Moving Average
  • Three Month Moving Average
  • Year Over Year Growth %
  • Year Over Year Growth
  • Quarter Over Quarter Growth %
  • Quarter Over Quarter Growth
  • Month Over Month Growth %
  • Month Over Month Growth

The Choose Target Hierarchy and Calculations page appears, with our selections, as depicted in Illustration 15.

Illustration 15: The Choose Target Hierarchy and Calculations Page with Selections ...

Because the Time Intelligence enhancement capability of the Business Intelligence Wizard is based upon a template, TimeIntelligence.xml (found at C:\Program Files\Microsoft SQL Server\90\Tools\Templates\OLAP\1033 in a default installation), we can add additional calculations to customize the selections to meet the specific needs of our own environments, just as we can customize other Analysis Services capabilities and characteristics. A small sample of the .xml template, with Description and View Name enclosed in red rectangles, appears in Illustration 16.

Illustration 16: Sample Section of the Time Intelligence Template

11.  Click Next to accept our input and proceed.

The Define Scope of Calculations page appears next. Here, we essentially “assign” the Time calculations we have specified to the desired measures. The Wizard presents the option to select from both regular and calculated measures, so that our only real limitations here are our business requirements (and, of course, the state of whether or not a given calculation / measure juxtaposition is logical in nature).

12.  Within the Available measures selection list of the Define Scope of Calculations page, place a check in the checkbox to the immediate left of each of the following measure selections:

  • Internet Sales Amount
  • Internet Order Quantity
  • Internet Gross Profit
  • Internet Gross Profit Margin
  • Internet Average Unit Price
  • Internet Average Sales Amount
  • Internet Ratio to All Products
  • Internet Ratio to Parent Product

The Define Scope of Calculations page appears, with our selections, as depicted in Illustration 17.

Illustration 17: The Define Scope of Calculations Page with Selections ...

13.  Click Next to accept our input, once again, and proceed.

The Completing the Wizard page appears next. At this point we can overview the changes that are about to be undertaken, based upon our selections within the pages of the Business Intelligence Wizard. Proposed changes to structural elements within the three main locations that house them, including the Data Source View, the Time Dimension, and the MDX Script, are presented within the Changes list, which appears as partially shown in Illustration 18.

Illustration 18: The Completing the Wizard Page (Partial View) with Proposed Changes

14.  Click Finish to execute the changes and to dismiss the Business Intelligence Wizard

The Wizard closes and we are returned to the Cube Designer, Calculations tab.

15.  Right-click the Adventure Works.cube (Design) tab.

16.  Select Close from the context menu that appears, as depicted in Illustration 19.

Illustration 19: Closing the Cube Designer ...

17.  Click Save on the Microsoft Visual Studio dialog that next appears, asking if we wish to save changes to cube “Adventure Works,” as depicted in Illustration 20.

Illustration 20: Click Save to Confirm Wish to Save Changes ...

The dialog disappears, and the Cube Designer closes.

Having completed Time Intelligence implementation for the Calendar hierarchy, we are ready to examine the areas we previewed in the previous section to confirm our understanding of the changes made to the cube model. We will perform this examination, together with a review of various settings and properties that may be considerations, in our next article, Mastering Enterprise BI: Time Intelligence Pt. III. Our extended examination will support a compelling case for our exploiting the Time Intelligence capabilities of the Business Intelligence Wizard in Analysis Services 2005.

18.  Preview the changes within the Date Dimension Designer and the Cube Designer, (which we will examine together as one objective in our next article), as desired.

19.  Select File -> Save All from the main menu, to save our work through this point, as shown in Illustration 21.

Illustration 21: Saving All Work from Our Session

20.  Select File -> Exit, when ready, to leave the Business Intelligence Development Studio.


In this article, we continued the examination, begun in Mastering Enterprise BI: Time Intelligence Pt. I, of Analysis Services 2005 features that support the Time dimension within our Analysis Services 2005 cube models. Our focus extended into further enhancements introduced in Analysis Services 2005 to specifically support virtually any “custom” relative time aggregation requirement that we might encounter within our respective business environments. Our examination of new features that support the easy addition of Time Intelligence within our cube models began with a discussion surrounding the concept of relative time aggregations, and how the Time dimension in general, and custom time periods specifically, have been accommodated in formerly dominant BI applications, such as Cognos Transformer / PowerPlay. We then touched upon general approaches to meeting the requirement for relative time aggregations in Analysis Services 2005.

Next, we provided a general introduction to the Business Intelligence Wizard in Analysis Services 2005, narrowing our focus to one of its many cube enhancement capabilities, the implementation of Time Intelligence in general, and the accommodation of custom relative time aggregations specifically. We previewed various perspectives in the cube structure that we had expected to be altered by the Business Intelligence Wizard, concomitant to its implementation of Time Intelligence, to provide a basis of comparison in our next article, where we will examine the structures put into place by the Business Intelligence Wizard, together with relevant properties and settings that form considerations surrounding their successful use. We then performed a practice exercise, whereby we added relative time aggregations support with this straightforward method. Throughout the steps of our practice session, we touched upon various details to consider when implementing Time Intelligence in our respective business environments.

» See All Articles by Columnist William E. Pearson, III

Discuss this article in the MSSQL Server 2000 Analysis Services and MDX Topics Forum.

MS SQL Archives

Latest Forum Threads
MS SQL Forum
Topic By Replies Updated
SQL 2005: SSIS: Error using SQL Server credentials poverty 3 August 17th, 07:43 AM
Need help changing table contents nkawtg 1 August 17th, 03:02 AM
SQL Server Memory confifuration bhosalenarayan 2 August 14th, 05:33 AM
SQL Server Primary Key and a Unique Key katty.jonh 2 July 25th, 10:36 AM