How to use CUBEMEMBERPROPERTY function in Excel?

The `CUBEMEMBERPROPERTY` function in Excel is used to return the value of a member property from a cube, which is typically a data source that uses OLAP (Online Analytical Processing) technology like SQL Server Analysis Services. This function is beneficial when you are working with data models in Excel that connect to external data sources.

Syntax

CUBEMEMBERPROPERTY(connection, member_expression, property)

Here’s a breakdown of the parameters:

  • connection: This is a text string that specifies the name of the connection to the cube data source. You would usually provide a cell reference that contains the connection name or type the connection name directly, typically enclosed in double quotes.
  • member_expression: This expression specifies the member or tuple in the cube from which you want to retrieve the property. You can often use a `CUBEMEMBER` function, or provide the member’s unique name as a string.
  • property: A string representing the name of the property that you wish to retrieve for the specified member.

Example

To illustrate how to use `CUBEMEMBERPROPERTY`, consider the following example:

   =CUBEMEMBERPROPERTY("SalesData", "[Product].[Category].&[Bikes]", "MEMBER_CAPTION")
  • Assumptions:
    • You have a data connection to a cube named `SalesData`.
    • You want to retrieve the property `MEMBER_CAPTION` for a specific product.
  • Formula:
  • Explanation:
    • `”SalesData”` is the connection string to your data source.
    • `”[Product].[Category].&[Bikes]”` is the `member_expression` specifying that you want to retrieve a property for the “Bikes” category within the Product dimension.
    • `”MEMBER_CAPTION”` is the name of the property whose value you want to return. It often represents a more user-friendly display name of the member.

Tips

  • Connection: Ensure that your data connection is properly established, and that the cube is correctly set up within Excel’s Data Model.
  • Property Names: Property names are usually predefined in the OLAP data source. Common properties include `MEMBER_UNIQUE_NAME`, `MEMBER_CAPTION`, etc.
  • Handling Errors: If the function returns an error, verify that the connection string and member expression correctly reference existing elements. Also, double-check the spelling of the property name.

By understanding the structure and requirements of `CUBEMEMBERPROPERTY`, you can effectively retrieve member-specific information from complex data models, empowering you to harness the full potential of Excel’s analytical capabilities.

Unlock Your Potential

Excel

Basic - Advanced

Access

Access Basic - Advanced

Power BI

Power BI Basic - Advanced

Help us grow the project