Fix CUBEMEMBER Cannot Find Power Pivot Data Model Connection in Excel
Question details
The user is unable to reference the ThisWorkbookDataModel connection using the CUBEMEMBER function.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Using the CUBEMEMBER function to extract data from an existing Power Pivot data model.
- Observed behavior
- The ThisWorkbookDataModel connection does not appear or cannot be found by the CUBEMEMBER function, even though the data model and measures still exist in the workbook.
Ensure that your workbook is being opened in the desktop version of Excel, as Power Pivot data models and CUBE functions may not be fully supported or accessible in Excel for the Web.
Refresh or Recreate the Data Model Connection
Refreshing the data connections can restore the missing ThisWorkbookDataModel reference for your CUBE functions.
Sometimes Excel loses sync with its internal Power Pivot data model, causing the connection name to disappear from formula auto-complete. Forcing a manual refresh or a minor model update usually resolves this.
Navigate to the 'Data' tab on the Excel ribbon and click 'Queries & Connections'.
Locate your Data Model connection (typically named 'ThisWorkbookDataModel'), right-click it, and select 'Refresh'.
If the connection is still missing, go to the 'Power Pivot' tab and click 'Manage'. Make a minor, temporary change (like adding a blank column) to force the model to update and re-register.
Return to your Excel worksheet and type `=CUBEMEMBER("` to check if 'ThisWorkbookDataModel' now appears in the formula auto-complete dropdown.

Verify Syntax and Consider CUBEVALUE Alternative
Ensure the formula syntax is perfectly formatted, or switch to CUBEVALUE if you only need the aggregated measure result.
Experience Lightweight and Stable Data Analysis with WPS Office
Dealing with complex, broken Power Pivot data models in Microsoft Excel can be frustrating. For a smoother, lighter, and completely free alternative for your daily spreadsheet and data analysis needs, try WPS Office.
- 1. Download WPS Office: Visit the official WPS website to download the free installation package.
- 2. Install the Software: Run the installer and follow the quick setup wizard to install WPS Office on your computer.
- 3. Open Your Spreadsheets: Launch WPS Spreadsheets and open your existing Excel files to continue analyzing your data seamlessly.

Frequently Asked Questions
Why does my CUBEMEMBER function return a #NAME? error?
A #NAME? error usually occurs if the function name is misspelled or if the workbook is opened in an environment (like Excel for Mac or some versions of Excel Online) that does not fully support Power Pivot Data Models or CUBE functions.
What is the difference between CUBEMEMBER and CUBEVALUE?
CUBEMEMBER is used to return a specific member or tuple from the cube (often used to generate row or column headers), whereas CUBEVALUE returns the actual aggregated numerical value or measure from the cube based on the members you specify.
Can I use CUBE functions without Power Pivot?
CUBE functions require an OLAP cube or a Data Model to connect to. You can use them if you are connected to an external SQL Server Analysis Services (SSAS) database, but for local workbook data, the Power Pivot Data Model is required.
How do I find the exact connection name for my CUBE formula?
Go to the 'Data' tab, click 'Queries & Connections', and look at the 'Connections' tab. For local Power Pivot models built inside the workbook, the default connection name is typically 'ThisWorkbookDataModel'.




