The purpose of an MDX query is to extract values from an OLAP cube into a report. As explained in Chapter 1, “A Data Analysis Foundation,” a cube has dimensions (up to 64, if you count Measures as a dimension). A report does not have dimensions; it has axes (typically, a row axis, a column axis, and a filter axis). An axis can include labels from more than one dimension. A cube contains all possible values for all members of all levels of all dimensions. A report contains only selected values from selected levels of selected dimensions. An MDX query statement consists of the instructions for extracting a report from a cube.
An MDX query statement uses several new terms. Seeing the terms in a familiar context will make them easier to learn and understand. Browsers such as the Office PivotTable list use MDX query statements to populate a report. You can use the Office PivotTable list to learn MDX terminology. The initial report in the Chapter 7 HTML file shows only a single cell showing the total value for the Sales Dollars measure. The grand total is a single value from the cube. To retrieve this value, Analysis Services used the default member for each dimension.
Analysis Services comes with the MDX Sample application. The application allows you to type an MDX statement, run it, and see the results in a grid. The MDX Sample application includes a metadata pane, which allows you to browse the hierarchies and members of a cube, inserting dimension, level, and member names into the MDX expression. The application also comes with complete source files for the Microsoft Visual Basic project used to create it. If you’re a programmer of Visual Basic, you can customize or add enhancements to the application. Some of the controls in the MDX Sample application are similar to those in the Calculated Member Builder. In this section, you’ll take a few minutes to explore the interface.
In the Metadata tree, when you select either a level or a member that has children, the members appear in the list to the right of the metadata pane. You can double-click or drag members from the member list to add them to the query pane.
18.227.46.69