Practice free

CUBEMEMBER function

CUBEMEMBER fetches a single item from a cube, such as one product or one year, so you can use it in CUBEVALUE formulas. It needs an OLAP cube or Data Model connection.

Example

=CUBEMEMBER("ThisWorkbookDataModel","[Date].[Year].&[2024]")

Expected result: n/a Not yet checked in desktop Excel

Syntax

CUBEMEMBER(connection, member_expression, [caption])

Arguments in [square brackets] are optional.

connection (required)
Name of the cube connection, as text.
member_expression (required)
Multidimensional expression naming the member or tuple.
caption (optional)
Text to show instead of the member name.

Returns: The member (or tuple) from the cube, usable as an argument in other cube functions.

What Excel actually returns

Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.

FormulaExcel showsCase
=CUBEMEMBER("NoSuchConnection","[Measures].[Sales]") #N/A Unknown connection name
=CUBEMEMBER("ThisWorkbookDataModel","[Measures].[Sales]") #N/A ThisWorkbookDataModel without a model
=CUBEMEMBER("","[Measures].[Sales]") #N/A Empty connection string
=CUBEMEMBER(1,"[Measures].[Sales]") #N/A Connection is a number
=CUBEMEMBER("NoSuchConnection","[Measures].[Sales]","Sales") #N/A With caption
=CUBEMEMBER(Data!D1,"[Measures].[Sales]") #N/A Connection from blank cell

The Data sheet these formulas read

A cell that starts with = holds that formula.

Watch out for

  • Bad member syntax returns #N/A.
  • Shows the member caption, not a number.

Where it works

Excel
CUBEMEMBER is in every version of Excel from 2007 on. Needs an OLAP cube or Data Model connection; Windows desktop Excel only for most uses.
Google Sheets
No direct equivalent. No cube support in Google Sheets.

Part of Cube functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .