CUBEMEMBERPROPERTY function
Returns a property of a member in an OLAP cube, such as a product's list price or a store's size, checking that the member exists.
Available in Excel 2007 and later for Windows and Microsoft 365, with SQL Server Analysis Services (multidimensional) cubes; member properties are not generally available from the workbook Data Model
Excel 2007 and laterNot in Google Sheets
Syntax
CUBEMEMBERPROPERTY(connection, member_expression, property)| Argument | What it means | |
|---|---|---|
connection | Required | The name of the connection to the cube, e.g. an Analysis Services connection called "SalesCube". |
member_expression | Required | The MDX name of the member, or a reference to a CUBEMEMBER cell. |
property | Required | The MDX name of the property to return, e.g. "[Product].[Product].[List Price]". |
Returns: The value of the requested property for that member.
How CUBEMEMBERPROPERTY works
In an OLAP cube, members can carry properties - extra attributes that describe them but are not used for slicing, such as a product's list price, colour or weight, or a store's floor area. CUBEMEMBERPROPERTY reads one of those attributes for a given member. It also confirms the member exists: if it does not, you get #N/A instead of a value.
This function is mainly for organisations that connect Excel to SQL Server Analysis Services multidimensional cubes, where member properties are defined by the cube designer. In the examples a connection named SalesCube points to such a cube, whose Product attribute has a List Price property. The workbook Data Model (ThisWorkbookDataModel) does not expose member properties in the same way - there you would normally add the information as a column and use CUBEVALUE or a lookup.
Property names follow the pattern [Dimension].[Hierarchy].[Property]. In a PivotTable connected to the cube you can see available properties under PivotTable Analyze > Field Settings or by right-clicking a field and choosing Show Properties in Report.
Examples
1List price of a product
| A | B | |
|---|---|---|
| 1 | Product | List price |
| 2 | 149 |
Result: 149
The cube stores a List Price property for each product. For P-103 (the monitor) it returns 149, as maintained in the cube.
2Property of a member in another cell
| A | B | |
|---|---|---|
| 1 | Product | List price |
| 2 | 149 |
Result: 149
If A2 contains =CUBEMEMBER("SalesCube", "[Product].[Product].&[P-103]") (shown as P-103 or its caption), the property can be read from that cell instead of repeating the member name.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#N/A | The member or the property does not exist, or the source (such as the Data Model) does not support member properties. | Check the property name in the cube's design, or keep the attribute as a column in a table. |
#NAME? | The connection cannot be reached. | Check that the Analysis Services server is available. |
#GETTING_DATA | Data is still loading. | Wait a moment. |
Tips
- Ask the cube's administrator for the list of member properties; they are not always visible in the Field List.
- For workbook Data Models, use a related table column with CUBEVALUE instead.
Google Sheets
No OLAP cube functions; keep the properties in a table and look them up with XLOOKUP.
CUBEMEMBERPROPERTY in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.
| Language | Function name |
|---|---|
| Danish | KUBEMEDLEM.EGENSKAB |
| Dutch | KUBUSLIDEIGENSCHAP |
| Finnish | KUUTIONJÄSENENOMINAISUUS |
| French | PROPRIETEMEMBRECUBE |
| German | CUBEELEMENTEIGENSCHAFT |
| Hungarian | KOCKA.TAG.TUL |
| Italian | PROPRIETÀ.MEMBRO.CUBO |
| Norwegian (Bokmål) | KUBEMEDLEMEGENSKAP |
| Polish | WŁAŚCIWOŚĆ.ELEMENTU.MODUŁU |
| Portuguese (Brazil) | PROPRIEDADEMEMBROCUBO |
| Portuguese (Portugal) | PROPRIEDADEMEMBROCUBO |
| Russian | КУБСВОЙСТВОЭЛЕМЕНТА |
| Spanish | PROPIEDADMIEMBROCUBO |
| Swedish | KUBMEDLEMSEGENSKAP |
| Turkish | KÜPÜYEÖZELLİĞİ |