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 Apr 17, 2003

MDX in Analysis Services: Intermediate Concepts - Part 1 - Page 6

By William Pearson

Next, working within our current example, let's look further at retrieving values, by taking the following steps.

23.  Swap the Store dimension and the Measures dimension.

The Store dimension appears in the rows axis, presenting the results set shown below.

Illustration 10: The Store Dimension replaces the Measures Dimension.

24.  Highlight MyCalcMem2 in the Calculated Members folder of the Budget cube.

25.  Select the Value property for MyCalcMem2.

26.  Click the ellipsis button ("..") once again, to raise the Calculated Member Builder dialog.

27.  Type the following into the Value Expression box.

([Account].[Net Income],[Store].[Store Country].[Mexico])

28.  Click OK to close the Calculated Member Builder.

The Data Viewing pane appears as shown in Illustration 11 below.

Illustration 11: The Tuple Appears in the Calculated Member.

The total for the Mexican locations' Net Income (or, as we explained earlier, the Total Expenses, as no Revenues amounts are stored in the Budget cube) appears in every cell of the MyCalcMem2 row. Besides the two dimensions that we specified (Net Income and Mexico), the current member is implicitly used to satisfy the requirement for the identification of the remaining dimensions' members. In other words, the two dimensions specified in the tuple, together with the current members for any unspecified dimensions, compose the coordinates for the cell, and, contextually, the value of the cell.

29.  Select the Parent Dimension property of Calculated Member MyCalcMem2.

30.  Select the Account dimension via the drop-down arrow.

31.  Click any place on the Data tab, Data Viewing pane, to refresh.

32.  Swap the Measures dimension with the Store dimension, placing the Measures dimension in the rows axis.

The results set appears as below.

Illustration 12: The MyCalcMem2 Value does not Change.

As we see in the illustration, the MyCalcMem2 column shows the Net Income figure for the Mexican stores; the presence of the Mexico dimension in MyCalcMem2 specifies the Mexico member of the Store dimension as part of the context within which the value is derived.

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