Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
We’ll begin by entering queries directly into the query editor window in SSMS. To do this, start SSMS, and connect to your SQL Server Analysis Services (SSAS) instance and Adventure Works DW sample. Next, select the OLAP cube from the SSMS Object Explorer, and then click the New Query button to open a new MDX query editor window. The principal use of new queries is twofold: to generate particular types of reports or as the result of directly manipulating cube data in a client interface, such as a pivot table that supports direct query generation. A basic MDX query contains a SELECT statement, a definition for the COLUMNS axis, a definition for the ROWS axis, and the source cube. So a simple but meaningful query we can write against Adventure Works is shown here as well as in Figure 10-1:
SELECT [Measures].[Internet Sales Amount] ON COLUMNS,
[Customer].[State-Province] ON ROWS
FROM [Adventure Works]