Cube
CUBEMEMBER Function in Excel
Returns a member or tuple in a cube hierarchy.
Syntax
- =CUBEMEMBER(connection, member_expression, [caption])
Arguments
- connection (required): Connection string to cube
- member_expression (required): MDX expression
- caption (optional): Display text
Examples
- =CUBEMEMBER("Sales", "[Product].[Category].&[Electronics]") - Get Electronics category - Result: Member
CUBEMEMBER and data models
- Validate members with CUBEMEMBER before CUBEVALUE.
- Confirm the connection name matches your Power Pivot or OLAP model.
- Explore summaries with [Pivot tables guide](/guides/excel-pivot-tables-guide/).
Common errors
- #N/A if member not found
Use cases
- OLAP reporting
- Power Pivot
- Dimension navigation
Frequently asked questions
- What is CUBEMEMBER used for? CUBEMEMBER retrieves a specific member from a cube dimension, like a product category, date, or region. Use it to create dynamic slicers, build dimension hierarchies, or pass members to CUBEVALUE for filtered calculations.
- How do I reference a member with spaces in the name? Use the & syntax with brackets: =CUBEMEMBER(conn, "[Product].[Category].&[Home & Garden]"). The &[] syntax handles special characters. For numeric keys, omit quotes: &[2024] for year 2024.
- What is the caption parameter for? Caption provides custom display text. =CUBEMEMBER(conn, "[Date].[Year].&[2024]", "Current Year") shows 'Current Year' in the cell instead of '2024'. Useful for user-friendly reports.
Editorial review
- Reviewed by Excel.Directory Editorial Team. Updated May 2026.