When Excel’s Data Model fails, it usually stops queries from refreshing, breaks relationships between tables, or shows cryptic errors like "The expression refers to multiple columns" or "Cannot load the data model". This guide fixes the most common causes so your pivot tables, Power Query, and DAX formulas work again. No add-ins or external tools are needed—just Excel’s built-in tools.

What You'll Need

  • Microsoft Excel 2016 or later (including Microsoft 365)
  • Access to the source data files (CSV, SQL, Access, etc.) used in the Data Model
  • Administrative rights to restart Excel if needed
  • A backup of your workbook (optional but recommended)

Step-by-Step

  1. Open the Excel workbook containing the Data Model. If it opens with a warning about external data connections, do not click "Enable" yet—proceed to step 2 first.
  2. Go to the Data tab on the ribbon. Click "Get Data" > "Query Options". In the dialog that opens, go to the "Global" section and ensure "Enable background refresh" is checked. Click OK.
  3. Still on the Data tab, click "Manage Data Model". This opens the Power Pivot window. If it doesn’t open, Excel may be corrupted—close and reopen Excel, then try again.
  4. In Power Pivot, check the Tables pane on the left. Look for any table with a red exclamation mark or warning icon. Right-click the table and select "Table Properties". Verify the table name does not contain spaces, symbols, or start with a number. Rename it using only letters, numbers, and underscores (e.g., "Sales_Data" not "Sales Data!").
  5. Switch to the Diagram View tab in Power Pivot. Look for broken relationship lines (dashed or missing). Right-click any table involved in a broken relationship and select "Create Relationship". In the dialog, confirm the correct columns are selected for both sides of the relationship (e.g., "ProductID" in Sales table links to "ProductID" in Products table). Click OK.
  6. Go to the Home tab in Power Pivot and click "Refresh". Wait for the spinner to stop. If it hangs, press Esc to cancel, then proceed to step 7.
  7. Close Power Pivot. Back in Excel, go to Data > Connections. Select each connection listed and click "Properties". Under the Usage tab, ensure "Refresh data when opening the file" is unchecked (to avoid conflicts during editing). Click OK.
  8. Go to Data > Refresh All. Wait for all queries to complete. If any fail, note the error message and return to Power Pivot to check the source query in the Query Editor (Data > Get Data > Query Editor).
  9. In Query Editor, open each query (click "Edit" next to the connection). Check for columns that were renamed or deleted in the source file. Re-map any missing columns using "Replace Values" or "Remove Columns" as needed. Click "Close & Load".
  10. Return to Excel and save the workbook. Close and reopen the file. Test by refreshing a pivot table connected to the Data Model.

Common Mistakes

  • Using table names with spaces or special characters (e.g., "Customer Data 2024"), which breaks DAX formulas and relationships.
  • Linking tables on columns with mismatched data types (e.g., text in one table, number in another), which prevents relationships from forming.
  • Refreshing the Data Model while the source file is open in another program, causing file locks.
  • Editing the source data directly in Excel while the Data Model is active, which can corrupt the cache.
  • Assuming Power Query and the Data Model are the same thing—they’re linked but separate; fixing one doesn’t fix the other.

Tips

  • Always rename tables and columns in Power Pivot before creating relationships—never rely on default names like "Table1" or "Column1".
  • Use the "Advanced Editor" in Query Editor to review M code for syntax errors if refreshes fail repeatedly.
  • Keep source data files in a stable location (e.g., a folder on your C: drive, not OneDrive or a network share) during development.
  • Use the "Data Category" setting in Power Pivot (right-click column > Data Category) to ensure dates, currencies, and IDs are interpreted correctly.
  • After fixing a relationship, rebuild pivot tables from scratch instead of reusing old ones—old pivot tables may retain broken field references.
  • Use the "Modeling" tab in Power Pivot to set "Is Unique" on key columns (like IDs) to improve performance and avoid duplicate key errors.

Troubleshooting

  • If "Manage Data Model" is grayed out, you might be in a .xlsx file with no imported data. Add at least one table via Data > Get Data first.
  • If Excel freezes when opening the workbook, hold Ctrl while launching Excel to start in Safe Mode. Open the file there and disable all add-ins via File > Options > Add-ins.
  • If you see "The expression refers to multiple columns" in a DAX formula, check that you’re using the full column reference: TableName[ColumnName], not just ColumnName.
  • If refreshes take minutes and fail, reduce the size of your data model by removing unused tables or filtering source data in Query Editor before loading.
  • If relationships vanish after saving, the workbook may be corrupted. Copy all sheets to a new workbook (right-click sheet tab > Move or Copy > Create a copy), then rebuild the Data Model from scratch using the copied data.
  • If Excel crashes on startup, go to %appdata%\Microsoft\Excel\XLSTART and rename or delete any custom template files that might conflict.

Frequently Asked Questions

Why does my pivot table show "This field is not in the data model"?

The field was removed or renamed in Power Pivot after the pivot table was created. Delete the pivot table and create a new one using fields from the Data Model.

Can I use the Data Model with Excel Online?

No, Excel Online does not support the Data Model or Power Pivot. You must use the desktop version of Excel to create or edit it.

Do I need to refresh the Data Model every time I change source data?

Yes. Excel does not auto-refresh the Data Model when the source file updates. Use Data > Refresh All after changes to the source data.

What’s the difference between Power Query and the Data Model?

Power Query loads and transforms data; the Data Model stores the cleaned data and defines relationships between tables. You need both: Power Query prepares data, the Data Model connects it.

Why do I get an error when linking two tables with identical column names?

Excel requires unique column names across all tables in the Data Model. Rename one column (e.g., "ID" to "CustomerID") before creating the relationship.

Can I undo a broken relationship in the Data Model?

Yes. In Diagram View, click the relationship line and press Delete. Then recreate it using the correct columns. There’s no "Undo" for relationships, so document your changes.