Creating a Cell Within the Context of a Cube
For certain applications, you may want 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 each 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 Multidimensional Expressions (MDX) statement for doing this takes the following form:
SELECT FROM cube_name WHERE slicer_specification
This results in a dataset with one cell. Because no axis dimensions are specified, the slicer specification focuses 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:
- The IMDDataset::GetAxisInfo method 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 axis for the slicer dimension will contain information on the slicer conditions that created the single cell.
- The single cell can be addressed by using the cell ordinal 0.