The CUBEMEMBER function returns a member or tuple from the cube. Use to validate that the member or tuple exists in the cube.

  • This function was introduced in Excel 2007 and so is not available in earlier versions.

Syntax

=CUBEMEMBER(connection,member_expression,[Caption])

Arguments

Argument Description
connection A text string of the name of the connection to the cube
member_expression A text string of 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] Optional. A text string displayed in the cell instead of the [Caption], if one is defined, from the cube. When a tuple is returned, the [Caption] used is the one for the last member in the tuple

Examples

  A B
1 Formula  
2 =CUBEMEMBER(“Sales”,”[Time].[Fiscal].[2004]”)  
3 =CUBEMEMBER($A$1,D$12)  
4 =CUBEMEMBER(“Sales”,(B4, C6, D5),”SalesFor2004″)  
5 =CUBEMEMBER(“xlextdat8 FoodMart 2000 Sales”,”([Product].[Food],[Time].[1997])”)  
6 =CUBEMEMBER($A$1,C$12:D$12)  

Note: Argument functions, such as member_expression, are limited to 255 characters. To use text strings longer than 255 characters, enter the text string in a cell, for which the limit is 32,767 characters, and then use a cell reference as the argument.

Common Function Error(s)

Problem What went wrong
#VALUE! Occurs if either:

  the member_expression is longer than 255 characters
  any element within the tuple is invalid
#N/A! Occurs if either:

  the member_expression syntax is incorrect
  the member specified by the MDX text string doesn’t exist in the cube
  the tuple is invalid because there is no intersection for the specified values
  the set contains at least one member with a different dimension than the other members
#NAME? Occurs if either:

  the connection name is not a valid workbook connection stored in the workbook
  the Online Analytical Processing (OLAP) server is not running, not available, or returns an error message