O'Reilly logo

Professional Microsoft® SQL Server® Analysis Services 2008 with MDX by Denny Guang-Yeu Lee, Robert Zare, Sethu Meenakshisundaram, Matt Carroll, Sivakumar Harinath

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

10.2. Restricting Cube Space/Slicing Cube Data

A typical cube contains several dimensions and each dimension can have several hundred or even thousands of members. For example, if you have a sales cube that contains products, the products dimension would likely have hundreds of products, if not thousands. During analysis, you would typically want to slice the data or drill down into specific sections of the cube to glean insights hidden in the data. Client tools help you to slice, dice, and drill down in cubes. These client tools dynamically generate MDX to restrict the cube space and generate queries. In this section, we refer to restricting the cube space in the context of MDX scripts or restricting the data being returned to the client when users slice and dice the data. Several ways exist to restrict the cube space when analyzing data and this section discusses using MDX to do this and appropriately retrieve the sections of the data you care about.

10.2.1. Using the SCOPE Statement

You already learned some techniques to restrict the searchable cube space, the use of which would depend on the context of your problem and what you are trying to accomplish. To refresh your memory, the SCOPE statement within MDX Scripts is used to restrict the cube space to form a subcube, which is a part of the cube projected along the dimensions specified within the SCOPE statement. The SCOPE statement is often used for cell calculations where the assignment statement typically is used with ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required