Share via


Creating a Cell Within the Context of a Cube

For certain applications, it might be desirable to return data for a single cell within a cube. For example, executives might have a decision-support application written in Microsoft? Excel that uses data from a multidimensional data store. Suppose that when the application starts every day, the executives want to view, at the top of the application's main window, the quarter-to-date worldwide sales for the current year across all products and customers.

The solution is to create a dataset for which all dimensions are slicer dimensions. The MDX statement for doing this takes the following form:

SELECT FROM cube_name WHERE slicer_specification

This results in a dataset with exactly one cell. Because no axis dimensions are specified, the slicer specification zeroes in on the desired point in the entire cube.

In this case, where there are no axes and hence only one cell, the following conditions apply:

  • IMDDataset::GetAxisInfo returns 0 for *pcAxes and a null pointer in *prgAxisInfo.

  • The axis rowsets for all axes will be empty, except for the axis MDAXIS_SLICERS. The slicers axis will contain information on the slicer conditions that created the single cell.

  • The single cell can be addressed by the cell ordinal 0.