Please note javascript is required for full website functionality.

Blog

A to Z of Excel Functions: The CUBEMEMBERPROPERTY Function

9 March 2018

Welcome back to our regular A to Z of Excel Functions blog. Today we look at the CUBEMEMBERPROPERTY function.


The CUBEMEMBERPROPERTY function

When the workbook is connected to a Microsoft SQL Server 2005 Analysis Services or later data source, the CUBEMEMBERPROPERTY function, one of the Cube functions in Excel, returns the value of a member property from a cube. You may use it to validate that a member name exists within the cube, and to return the specified property for this member.

The CUBEMEMBERPROPERTY function employs the following syntax to operate:

CUBEMEMBERPROPERTY(connection, member_expression, property)

The CUBEMEMBERPROPERTY function has the following arguments:

  • connection: this is required and represents a text string of the name of the connection to the cube
  • member_expression: this is also required.  This is a text string of a multi-dimensional expression (MDX) of a member within the cube
  • property: again, this is required and represents a text string of the name of the property returned or a reference to a cell that contains the name of the property.

It should be further noted that: 

  • the CUBEMEMBERPROPERTY function is supported only when the workbook is connected to a Microsoft SQL Server 2005 Analysis Services or later data source
  • when the CUBEMEMBERPROPERTY function evaluates, it temporarily displays a "#GETTING_DATA…" message in the cell before all of the data is retrieved
  • if the connection name is not a valid workbook connection stored in the workbook, CUBEMEMBERPROPERTY returns an #NAME? error value.  If the Online Analytical Processing (OLAP) server is not running, not available or returns an error message, CUBEMEMBERPROPERTY returns an #NAME? error value
  • if the member_expression syntax is incorrect or if the member specified by member_expression doesn't exist in the cube, CUBEMEMBERPROPERTY returns an #N/A error value
  • CUBEMEMBERPROPERTY may return an #N/A error value if you reference a session-based object, such as a calculated member or named set, in a PivotTable when sharing a connection, and that PivotTable is deleted or you convert the PivotTable to formulae (on the ‘Options’ tab in the Ribbon, in the ‘Tools’ group, click ‘OLAP Tools’, and then click ‘Convert to Formulas’)
  • CUBEMEMBERPROPERTY will not work against Excel Data Models that are edited in Power Pivot, since they are not multi-dimensional cubes.

Please see my examples below:

=CUBEMEMBERPROPERTY("Sales","[Time].[Fiscal].[2020]",$A$3)

=CUBEMEMBERPROPERTY("Sales","[Store].[MyFavoriteStore]","[Store].[Store Name].[Store Sqft]")

We’ll continue our A to Z of Excel Functions soon.  Keep checking back – there’s a new blog post every business day.

Newsletter