Describing the Axes

A dataset is a discrete collection consisting of data points dimensioned by the axes. In order to manipulate the dataset, the application needs information about the following:

The method IMDDataset::GetAxisInfo returns an array of structures, one structure for each axis. This structure, denoted as MDAXISINFO in the header files, has fields that contain the axis number, the number of dimensions on the axis, the number of coordinates on the axis, the number of columns corresponding to each dimension on the axis, and the name of each dimension projected on the axis. The field containing the dimension names is an array. The order of dimension nesting is implicitly contained in the order of dimension names that appear on this array — the outermost dimension appears first, and so on. This method also returns the number of axes in the dataset. For more information on the structure of MDAXISINFO, see “MDAXISINFO Structure” in Chapter 4.

Axis Rowset

After the consumer obtains basic information about the axes, the next step is to get detailed information on what each tuple on the axis looks like. This means that the consumer needs to get the properties of each member of each tuple (recall that a tuple is made of one or more components, and each component is a member). All this information is available as a rowset, called the axis rowset. There exists one axis rowset per axis. You can retrieve an axis rowset with IMDDataset::GetAxisRowset. This function takes as an argument the axis ordinal number and returns the corresponding axis rowset.

Each row in the axis rowset corresponds to a tuple on the axis. The first column of the axis rowset is called TUPLE_ORDINAL (see “Cell Navigation in a Dataset” for more information on the tuple ordinal), and this contains the ordinal number of the tuple that a given row corresponds to. The remaining columns contain member properties.

Regardless of whether you choose any member properties by using the DIMENSION PROPERTIES clause or not (see “Retrieving Member Properties”), the axis rowset always contains several properties for the dimension members, such as its unique name, the level to which it belongs, its display caption, etc. For a list of these properties, see “Axis Rowsets” in Chapter 4.

One column for each property will be included in the axis rowset for each projected dimension on the axis. If you specify more properties for a dimension (by using the DIMENSION PROPERTIES keyword), those properties will appear as additional columns after the columns for the default properties for the dimension. The axis rowset for an axis contains as many rows as there are axis tuples. Calling IColumnsInfo on the axis rowset retrieves metadata such as name, data type, and so on, of the columns of the axis rowset.