Specifying the Contents of an Axis

OLE DB Programmer's Reference

The number of axes and the contents of each axis are specified after the SELECT keyword and immediately before the FROM clause in the expression template shown in "Parts of an MDX Statement."

Each <axis_specification> value specifies one axis. The number of axes in the dataset is equal to the number of <axis_specification> values in the MDX statement.

To understand what constitutes an <axis_specification> value, it is necessary to understand the nature of an axis.

Contents of the x-Axis

In the dataset of the SalesData example, the x-axis has two nested dimensions: Geography and SalesRep. From the Geography dimension, four members are selected: Seattle, Boston, USA_South, and Japan. Two members are selected from the SalesRep dimension: Venkatrao and Netz. This yields a total of eight coordinates on this axis (8 = 4*2).

You can represent each coordinate as a tuple with two members—one from the SalesRep dimension and another from the Geography dimension—as follows:

(Venkatrao, Seattle), (Venkatrao, Boston), (Venkatrao, USA_South), (Venkatrao, Japan), (Netz, Seattle), (Netz, Boston), (Netz, USA_South), (Netz, Japan)

Consider an axis as comprising a set of tuples. If there is only one dimension on an axis, each tuple is just a member. If there are two dimensions, two components compose each tuple, with each component being a member of one of the dimensions. In general, if there are n dimensions nested on an axis, n components compose each tuple, where each component is a member of one of the nested dimensions.

Contents of the y-Axis

The y-axis of the dataset has the following set of tuples:

Jan, Feb, Mar, Qtr2, Qtr3, Oct, Nov, Dec

In this case, each tuple has just one component, making it the same as a member because there is only one dimension on this axis.

1998-2001 Microsoft Corporation. All rights reserved.



Microsoft Ole Db 2.0 Programmer's Reference and Data Access SDK
Microsoft OLE DB 2.0 Programmers Reference and Data Access SDK (Microsoft Professional Editions)
ISBN: 0735605904
EAN: 2147483647
Year: 1998
Pages: 1083

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net