Using Tuple Expressions

A tuple is made up of one member from every dimension that is contained within a cube. Therefore, a tuple uniquely identifies a single cell within the cube.

Note

A tuple that references one or more members that are not valid is known as an empty tuple.

The complete expression of a tuple identifier is made up of one or more explicitly specified members, framed in parentheses:

(Member_expression [ ,Member_expression ... ] )

A tuple can be fully qualified, can contain implicit members, or can contain a single member.

Tuples and Implicit Members

A tuple that explicitly specifies a single member from every dimension that is contained within a cube is known as a fully qualified tuple. However, a tuple does not have to be fully qualified.

Any dimension not explicitly referenced within a tuple is implicitly referenced. The member for the implicitly referenced dimension depends on the structure of the dimension:

  • If the implicitly referenced dimension has a default member, the default member is added to the tuple.
  • If the implicitly referenced dimension has no default member, the (All) member of the default hierarchy is used.
  • If the implicitly referenced dimension has no default member, and the default hierarchy has no (All) member, the first member of the topmost level of the default hierarchy is used.

For example, a cube has two dimensions named Product and Customer. Each of these dimensions has a single attribute, but neither of these dimensions has a defined default member. For this cube, you define the following tuple:

([Measures].[Unit Sales])

The previous tuple is equivalent to the following tuple:

([Measures].[Unit Sales], [Product].[Product].[All Products], [Customer].[Customer].[All Customers])

One-Member Tuples

If the tuple expression has a single member, MDX converts the member into a one-member tuple for the purposes of evaluating the expression. In other words, providing the member expression [Measures].[TestMeasure] instead of a tuple expression is functionally equivalent to the tuple expression ( [Measures].[TestMeasure] ).

See Also

Concepts

Expressions (MDX)

Help and Information

Getting SQL Server 2005 Assistance