Database Reference
In-Depth Information
points to the previous cell with value 21 and the one behind it with value 12.
It is worth noting that a set may have one or even zero tuples.
A tuple does not need to specify a member from every dimension. Thus,
the tuple
(Customer.City.Paris)
points to the slice of the cube composed of the sixteen front cells of the cube,
that is, the sales of product categories in Paris, while the tuple
(Customer.City.Paris, Product.Category.Beverages)
points to the four cells at the front and left of the cube, that is, the sales of
beverages in Paris. If a member for a particular dimension is not specified,
then the default member for the dimension is implied. Typically, the default
member is the All member, which has the aggregated value for the dimension.
However, as we will see later, the default member can be also the current
member in the scope of a query.
Let us see now how tuples interact with hierarchies. Suppose that in our
cube we have a hierarchy in the customer dimension with levels Customer ,
City , State ,and Country . In this case, the following tuple
(Customer.Country.France, Product.Category.Beverages, Time.Quarter.Q1)
uses the aggregated member France and therefore points to the single cell
that holds the value for the total sales of beverages in France in the first
quarter.
In MDX, measures act much like dimensions. Suppose that in our cube
we have three measures UnitPrice , Discount ,and SalesAmount .Inthiscase,
the Measures dimension, which exists in every cube, contains three members,
and thus, we can specify the measure we want as in the following tuple:
(Customer.Country.France, Product.Category.Beverages, Time.Quarter.Q1,
Measures.SalesAmount)
If a measure is not specified, then a default measure will be used.
6.1.2 Basic Queries
The syntax of a typical MDX query is as follows:
SELECT axis specification
FROM cube
[WHERE slicer specification ]
As can be seen, at a first glance, MDX resembles SQL, but as we will see in
this chapter, the two languages differ in several significant ways.
Search WWH ::




Custom Search