[Table of Contents] [docx version]

SpreadsheetML Reference Material - Table of Contents

CUBEMEMBER

Syntax:

CUBEMEMBER ( connection , member-expression , [ , [ caption ] ] )

Description: Fetches from the OLAP cube on the SQL Server designated by connection, the member or tuple defined by member-expression. [Note: This function is used to validate that the member or tuple exists in the cube. end note]

When a call to CUBEMEMBER is used as an argument to another CUBExxx function, the MDX expression that identifies the member or tuple is used by that CUBExxx function, rather than the displayed value in the cell of the CUBEMEMBER function.

Arguments:

Name

Type

Description

connection

text

The name of the connection to the cube.

member-expression

text, reference, array

A multidimensional expression (MDX) that evaluates to a unique member in the cube. Alternatively, member-expression can be a tuple, specified as a cell range or an array constant.

caption

text

The string displayed in the cell instead of the caption from the cube (assuming it defines such a caption). When a tuple is returned, the caption used is the one for the last member in the tuple.

 

Return Type and Value: any – A member or tuple in a cube hierarchy.

However, if

The connection name is not a valid workbook connection stored in the workbook, the return value is unspecified.

The OLAP server is not running, not available, or returns an error message, the return value is unspecified.

At least one element within the tuple is invalid, the return value is unspecified.

The syntax of member-expression is incorrect, the return value is unspecified.

The member specified by member-expression doesn’t exist in the cube, the return value is unspecified.

The tuple is invalid because there is no intersection for the specified values, the return value is unspecified.

The set contains at least one member with a different dimension than the other members, the return value is unspecified.

[Example:

CUBEMEMBER("Sales","[Time].[Fiscal].[2004]")
CUBEMEMBER($A$1,D$12)
CUBEMEMBER("Sales",(B4,C6,D5),"SalesFor2004")
CUBEMEMBER("Sales",{[Products].[Food];[Time].[Fiscal].[2004]})
CUBEMEMBER($A$1,C$12:D$12)

end example]