Quick Navigation
CUBEMEMBER Function
Summary
The CUBEMEMBER function retrieves a specific member or tuple from an OLAP cube using MDX expressions. It validates cube membership and returns the member for use in other cube functions, essential for dynamic multidimensional data analysis.
Syntax
CUBEMEMBER(connection, member_expression, [caption])
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| connection | string |
Yes | Text string identifying the cube connection in the workbook |
| member_expression | string |
Yes | MDX string evaluating to a unique cube member/tuple |
| caption | string |
No | Optional display text overriding cube caption |
Using the CUBEMEMBER Function
CUBEMEMBER serves as the foundational function for OLAP cube analysis in Excel. Use it to reference specific dimensions, measures, or time periods from Power Pivot or external cubes. Returns the actual MDX reference for use in other CUBE functions like CUBEVALUE.
Common CUBEMEMBER Examples
Basic Member Retrieval
=CUBEMEMBER("Sales","[Time].[Fiscal].[2004]")
Returns the 2004 fiscal year member from Sales cube
Tuple with Custom Caption
=CUBEMEMBER("Sales",(B4,C6,D5),"SalesFor2004")
Creates sales tuple for specific dimensions with custom display name
Cell Reference for Long MDX
=CUBEMEMBER($A$1,D$12)
Uses cell containing long MDX expression to avoid 255-character limit
Product/Time Tuple
=CUBEMEMBER("FoodMart","([Product].[Food],[Time].[1997])")
Returns Food products for 1997 from FoodMart cube
Frequently Asked Questions
Common Errors and Solutions
#NAME?
Cause: Invalid connection name or unavailable OLAP server
Solution: Verify connection exists in Data > Connections
#VALUE!
Cause: Invalid tuple element or MDX >255 characters
Solution: Check tuple syntax; use cell reference for long MDX
#N/A
Cause: Member doesn't exist, invalid syntax, or no tuple intersection
Solution: Validate MDX against cube structure
Notes
- Temporarily shows #GETTING_DATA… during evaluation
- Use cell references for MDX >255 characters
- Tuples from same hierarchy may have no intersection
- Session-based objects cause #N/A after PivotTable conversion
Compatibility
Available in: Excel 2007, Excel 2010, Excel 2013, Excel 2016, Excel 2019, Excel 2021, Excel 365
Not available in: Excel 2003 and earlier
Content last reviewed: December 9, 2025
Update frequency: As needed
Excel versions tested: Excel 2007+