MDAC 2.5 SDK - OLE DB Programmer's Reference
Chapter 24: Multidimensional Expressions


 

Specifying Slicer Dimensions

Dimensions not explicitly assigned to an axis are assumed to be slicer dimensions and are filtered on their default members. If any such dimensions do not have default members, an error occurs.

The slicer dimensions for the example dataset are Measures, Years, and Products. By making these the slicer dimensions, the application is requesting the dataset for Sales (on the Measures dimension), 1991 (on the Years dimension), and [All] (all products on the Products dimension). For the example dataset, the slicing condition can be expressed as follows:

WHERE (Sales, Years, Products.[All])

Because the member name "All" might not be unique within the cube, it must be qualified with the dimension name to make it unambiguous. For more information, see "Name Space and Unique Names" in this chapter.

Note   A slicer need not always be a tuple. In its most general form, a slicer is a set of tuples, even though it is likely that most providers will not support multiple tuples in a slicer. The property MDPROP_SLICER returns information on the provider capabilities in this area. If a slicer is a set of tuples, it is equivalent to the one tuple for which each component is a dynamic aggregate of the members selected from that dimension. For example, if the slicer is

      WHERE CROSSJOIN({Sales}, {[1991], [1992]})

it is equivalent to

      WHERE {(Sales, [1991]), (Sales, [1992])}

and the provider generates a dynamic member on the Years dimension, which is the aggregate of 1991 and 1992. This dynamic member is used as the slicer coordinate for that dimension. Based on the context, the provider picks the right aggregation function to use. Semantically, the effect is the same as using the AGGREGATE function. For more information about the AGGREGATE function, see "Numeric Functions" in this chapter.