In this example, you will learn more about the MDX structure and how to write queries in the MDX language.
Open SQL Server Management Studio, connect to the Analysis Services instance, and click on Chapter 02 SSAS Multi Dimensional, and then click on New Query.
In the New Query window, write the following expression:
select [Order Date].[Calendar Year].members on 0 from [Internet Sales]
You will see a list of the years, the sales amount for each year, and the grand total.
Now, run the following statement:
select [Sales Territory].[Sales Territory Country].members on 0, [Order Date].[Calendar].[Calendar Year].members on 1 from [Internet Sales]
Check the result and you will see the years listed in each row, the countries listed in each column, and the Sales Amount measure shown in each cell, which represents the sales amount of that country in that year.