Skip to main content

Excel CUBEMEMBER Function

The CUBEMEMBER function retrieves a member or tuple from a cube if it exists. Otherwise, a #N/A error value will be returned.

cubemember function 1


Syntax

=CUBEMEMBER(connection, member_expression, [caption])


Arguments

  • connection (required): A text string of the name of the connection to the data model (cube).
  • member_expression (required): A text string of a multidimensional expression (MDX) you want to evaluate. Alternatively, member_expression can be a tuple that is specified as a range or array.
  • caption (optional): A text string that overwrites the caption which is defined from the cube. When a tuple is returned, the caption will be the one for the last member in the tuple.

Return Value

The CUBEMEMBER function returns the member or tuple from a cube.


Function Notes

  • The #GETTING_DATA… message is displayed while the data is being retrieved.
  • CUBEMEMBER returns the #NAME? error value if:
    • connection is not a valid workbook connection stored in the workbook, e.g., ThisWorkbookDataModel;
    • Online Analytical Processing (OLAP) server is unavailable, not running, or returned an error message.
  • CUBEMEMBER returns the #VALUE! error value if:
    • There is one or more invalid elements in the tuple;
    • member_expression is longer than 255 characters. Note: You can enter the text string in a cell and then reference the cell as the argument as a workaround.
  • CUBEMEMBER returns the #N/A error value if:
    • member_expression is not valid;
    • The member to be returned from the cube does not exist;
    • The set contains one or more members with a different dimension than the other members;
    • The tuple in the member_expression argument is not valid since there is no intersection for the specified values.
  • Arguments of CUBEMEMBER should be closed with double quotes ("").
  • Names of members, dimensions or tables, etc. you write in member_expression should be wrapped in square brackets ([ ]).

Example to retrieve memebers

I have a table here named “sales2021” which includes the information of sales and rating of different products of 2 categories across the year 2021. To use the CUBEMEMBER function to retrieve members from the table, you should first add the data from this table to the Data Model in the existing workbook, its name will always be ThisWorkbookDataModel. Then please copy or enter the formula below in cell where you want to fetch a member (here I will fetch Caps as an example), and press Enter to get the result:

=CUBEMEMBER("ThisWorkbookDataModel","[sales2021].[Product].&[Caps]")

cubemember function 2

√ Note: In the formula above, CUBEMEMBER returns the member named Caps of the Product category from the table sales2021 in the ThisWorkbookDataModel cube. To fetch January, you can use the formula:

=CUBEMEMBER("ThisWorkbookDataModel","[sales2021].[Month].&[January]"


Example with a measure name

To use CUBEMEMBER to summarize members from the table, such as to get the sum of sales in different months, the average ratings of different products, you can use a measure name. In this example, I entered the below formula in cell G5 with a measure expression that will apply against the entire data set.

=CUBEMEMBER("ThisWorkbookDataModel","[Measures].[Sum of Sales]")

cubemember function 3

√ Note: You can add a caption argument, e.g., “Sales” or “Month”, to display a name you want in cell G5 instead of Sum of Sales, since the measure has a redundant name that could make the report hard to read, for example:

=CUBEMEMBER("ThisWorkbookDataModel","[Measures].[Sum of Sales]","Sales")

cubemember function 4


Related functions

Excel CUBEVALUE Function

The CUBEVALUE function returns an aggregated value from a cube filtered by multiple member_expression arguments.

Excel CUBEKPIMEMBER Function

The CUBEKPIMEMBER function returns the key performance indicator (KPI) property and displays the KPI name in the cell.

Excel CUBESET Function

The CUBESET function defines a calculated set of members or tuples by sending a set expression to the cube on the server. The function can extract all unique values from a set expression, and it offers options for sorting.

Excel CUBESETCOUNT Function

The CUBESETCOUNT function returns the number of items in a set.


The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates  |  Delete Blank Rows  |  Combine Columns or Cells without Losing Data  |  Round without Formula ...
Super VLookup: Multiple Criteria  |  Multiple Value  |  Across Multi-Sheets  |  Fuzzy Lookup...
Adv. Drop-down List: Easy Drop Down List  |  Dependent Drop Down List  |  Multi-select Drop Down List...
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  Compare Columns to Select Same & Different Cells ...
Featured Features: Grid Focus  |  Design View  |  Big Formula Bar  |  Workbook & Sheet Manager | Resource Library (Auto Text)  |  Date Picker  |  Combine Worksheets  |  Encrypt/Decrypt Cells  |  Send Emails by List  |  Super Filter  |  Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters ...)  |  50+ Chart Types (Gantt Chart ...)  |  40+ Practical Formulas (Calculate age based on birthday ...)  |  19 Insertion Tools (Insert QR Code, Insert Picture from Path ...)  |  12 Conversion Tools (Numbers to Words, Currency Conversion ...)  |  7 Merge & Split Tools (Advanced Combine Rows, Split Excel Cells ...)  |  ... and more

Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...

Description


Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations