MDAC 2.5 SDK - OLE DB Programmer's Reference
Chapter 24: Multidimensional Expressions
Types of Expressions in MDX
An MDX statement contains expressions that operate on sets, tuples, members, numbers, and strings. These expressions form the basis of the OLE DB for OLAP ability to provide a rich and powerful syntax for specifying datasets.
MDX statements operate on the following basic entities:
- Set. A set is a collection of tuple elements. A set value expression operates on member, tuple, and set elements to yield other sets. A numeric function operates on a set element and yields a number. For example, the function SUM({USA, France}, Sales) operates on the set {USA, France} and yields the sum of Sales. A tuple value expression operates on a set element and yields tuple elements.
- Member. This represents a member of a dimension. A member value expression can operate on a member element, which yields other member elements. For example, Boston.Parent yields the parent of the member Boston, which is Massachusetts.
- Tuple. A tuple is a collection of members from different dimensions. For example, (Boston, [1995]) is a tuple formed by members of two dimensions: Geography and Time. A single member is a degenerated case of a tuple and can be used as an expression without the parentheses.
- Number. A number can be an exact numeric, such as integer or decimal, or an approximate numeric, such as a float or double. You can compose numbers by the usual operators of addition, subtraction, multiplication, and division to yield other numbers. These compositions constitute numeric value expression elements.
- Time dimension. The time series functions operate on the dimension that is specified implicitly as part of their <set>, <member>, or <level> arguments. (The time series functions described in this chapter are, in fact, member, set, or numeric functions.)