How to Use the CUBEMEMBERPROPERTY Function in Excel

Welcome to the guide on using the CUBEMEMBERPROPERTY function in Microsoft Excel and Google Sheets. This function is essential for retrieving properties of specific members within Online Analytical Processing (OLAP) cubes. Through this guide, you will learn how to use the CUBEMEMBERPROPERTY function, explore typical use cases, and understand how to effectively employ this function in practical situations.

Overview

The CUBEMEMBERPROPERTY function extracts properties from a cube member or tuple. It requires the following arguments:

  • Member_expression: Identifies the cube member or tuple whose property you want to extract.
  • Property: Specifies the property of the member to retrieve, such as MEMBER_CAPTION, MEMBER_KEY, MEMBER_NAME, etc.
  • Cube_name: The name of the cube within the cube database. This argument is optional in certain contexts.

Examples

Below are examples demonstrating different use cases for the CUBEMEMBERPROPERTY function.

Example 1: Retrieve the Member Name

This example shows how to obtain the name of a specific member within a cube. Here’s the function syntax:

=CUBEMEMBERPROPERTY(Member_expression, "MEMBER_NAME")

To apply this in a practical scenario:

Member Name
[Product].[Category].&[1] =CUBEMEMBERPROPERTY(“[Product].[Category].&[1]”, “MEMBER_NAME”)

Example 2: Retrieve the Member Caption

In this example, the goal is to retrieve the caption for a particular member in a cube. Use the following syntax:

=CUBEMEMBERPROPERTY(Member_expression, "MEMBER_CAPTION")

Here is how you might use this:

Member Caption
[Date].[2019].[Q1] =CUBEMEMBERPROPERTY(“[Date].[2019].[Q1]”, “MEMBER_CAPTION”)

Implementation

To implement the CUBEMEMBERPROPERTY function in Excel or Google Sheets, follow these steps:

  1. Select the cell where you want the result to display.
  2. Type in the CUBEMEMBERPROPERTY function with the necessary arguments.
  3. Press Enter to display the property value.

Before using the CUBEMEMBERPROPERTY function, ensure your spreadsheet is connected to an OLAP cube data source.

By following these guidelines and examples, you’ll be able to effectively utilize the CUBEMEMBERPROPERTY function to extract detailed information about cube members in both Excel and Google Sheets.

More information: https://support.microsoft.com/en-us/office/cubememberproperty-function-001e57d6-b35a-49e5-abcd-05ff599e8951

Other functions
Returns a key performance indicator (KPI) name, property, and measure, and displays the name and property in the cell A KPI is a quantifiable measurement, such as monthly gross profit or quarterly employee turnover, used to monitor an organization's performance
Returns a member or tuple in a cube hierarchy Use to validate that the member or tuple exists in the cube
Returns the nth, or ranked, member in a set Use to return one or more elements in a set, such as the top sales performer or top 10 students
Defines a calculated set of members or tuples by sending a set expression to the cube on the server, which creates the set, and then returns that set to Microsoft Office Excel
Returns the number of items in a set
Returns an aggregated value from a cube