Creating a Cell Within the Context of a Cube

OLE DB Programmer's Reference

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.

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