In this comprehensive guide, we will explore the CUBEMEMBER function in Excel, which is a powerful tool for retrieving metadata from OLAP cubes. This function is particularly useful for users who work with data from external sources, such as SQL Server Analysis Services (SSAS) or other Online Analytical Processing (OLAP) databases. We will cover the syntax, examples, tips and tricks, common mistakes, troubleshooting, and related formulae for the CUBEMEMBER function.


The CUBEMEMBER function has the following syntax:

=CUBEMEMBER(connection, member_expression, )


  • connection is the name of the workbook connection to the OLAP cube. This is a required argument.
  • member_expression is a text string that defines the cube member or a tuple containing a single member. This is a required argument.
  • caption is an optional argument that specifies a label for the returned member. If omitted, Excel will use the default member caption.


Let’s look at some examples of how to use the CUBEMEMBER function in Excel:

Example 1: Retrieving a specific member from the OLAP cube:

=CUBEMEMBER(“SalesCube”, “[Product].[Category].[Bikes]”)

In this example, the CUBEMEMBER function retrieves the “Bikes” member from the “Product” dimension and “Category” hierarchy in the “SalesCube” connection.

Example 2: Retrieving a member with a custom caption:

=CUBEMEMBER(“SalesCube”, “[Product].[Category].[Bikes]”, “Bicycle Category”)

Here, the CUBEMEMBER function retrieves the “Bikes” member as in the previous example, but with a custom caption “Bicycle Category” instead of the default member caption.

Example 3: Using a cell reference for the member_expression:

=CUBEMEMBER(“SalesCube”, A1)

In this example, the CUBEMEMBER function retrieves the member specified in cell A1 of the worksheet. This allows for more dynamic and flexible use of the function, as the member_expression can be easily changed by updating the value in cell A1.

CUBEMEMBER Tips & Tricks

Here are some tips and tricks to help you get the most out of the CUBEMEMBER function in Excel:

  • Use cell references for the member_expression argument to make your formulas more dynamic and easier to update.
  • Combine CUBEMEMBER with other cube functions, such as CUBEVALUE, to retrieve both metadata and actual data from the OLAP cube.
  • Use the optional caption argument to customize the display of the returned member in your worksheet.
  • Remember that the CUBEMEMBER function is case-sensitive, so ensure that your member_expression argument is entered with the correct case.

Common Mistakes When Using CUBEMEMBER

Here are some common mistakes to avoid when using the CUBEMEMBER function:

  • Not specifying a valid connection name or member_expression. Ensure that both arguments are entered correctly and refer to existing elements in the OLAP cube.
  • Using incorrect syntax for the member_expression argument. Make sure to use the correct syntax for specifying dimensions, hierarchies, and members in your cube.
  • Forgetting that the CUBEMEMBER function is case-sensitive. Double-check your member_expression argument to ensure that it matches the case used in the OLAP cube.

Why Isn’t My CUBEMEMBER Working?

If your CUBEMEMBER function isn’t working as expected, consider the following troubleshooting steps:

  1. Check the connection name and member_expression arguments for any typos or incorrect syntax.
  2. Ensure that the specified connection is properly set up and connected to the OLAP cube.
  3. Verify that the member_expression argument refers to a valid member in the OLAP cube.
  4. Remember that the CUBEMEMBER function is case-sensitive, so double-check the case of your member_expression argument.
  5. Consult the Excel documentation or your OLAP cube documentation for any specific requirements or limitations related to the CUBEMEMBER function.

CUBEMEMBER: Related Formulae

Here are some related formulae that can be used in conjunction with the CUBEMEMBER function to perform more advanced analysis and reporting with OLAP cubes:

  • CUBEVALUE: Retrieves the value of a cube cell based on a set of member expressions. Use this function to retrieve actual data from the OLAP cube.
  • CUBEMEMBERPROPERTY: Retrieves the value of a specified property for a cube member. Use this function to retrieve additional metadata about a member.
  • CUBESET: Defines a set of members or tuples by sending a set expression to the cube on the server. Use this function to create custom sets for analysis.
  • CUBESETCOUNT: Returns the number of items in a set. Use this function to count the number of members or tuples in a custom set created with the CUBESET function.
  • CUBERANKEDMEMBER: Returns the nth member of a set. Use this function to retrieve a specific member from a custom set created with the CUBESET function.

By combining the CUBEMEMBER function with these related formulae, you can create powerful and flexible reports and analyses using data from your OLAP cubes in Excel.


Did you find this article useful?

Share it with your friends or colleagues

About Aepoch Advisors

We are a boutique accounting and consulting firm servicing international businesses operating in China. We offers book keeping and business advisory service. We also help our clients select and implement SAAS business applications
Cloud technology significantly reduces cost foreign companies traditionally spent on tax compliance and ERP systems. Our cloud professionals can help with streamlining your management and controling structure, as well as advising you on how to reduce risks and maximize profits with software purposely built for Chinese business. Contact us today to learn more about our services.