Home > Pivot > Create > Errors Excel Pivot Table ErrorsHow to troubleshoot and fix Excel pivot table errors, such as "PivotTable field name is not valid". Find the pivot table problems, and fix them, to prevent the error messages. Note: To change the way that error values show in a pivot table layout, see the Pivot Table Error Values page. |
IntroductionUsually, things go smoothly when you when you try to create a pivot table. However, occasionally you might see a pivot table error, such as "PivotTable field name is not valid", or "A PivotTable report cannot overlap another PivotTable report". This video shows a couple of pivot table problems, how to fix them, and a macro that can help with troubleshooting. There are written steps for troubleshooting, below the video. You can get the macro and workbook from the Pivot Table List Macros page, to follow along. |
Field Name Not ValidSometimes, if you try to create or refresh a pivot table in Microsoft Excel, a PivotTable error message appears:
Pivot Table Source DataIf we check the source data for this pivot table, everything looks okay. There are 7 columns of data, and no blank columns or rows in the list. There is a pivot table field name at the top of each column. Fix the Source DataThe pivot table error, "field name is not valid", usually appears because one or more of the heading cells in the source data is blank. To create a pivot table, you need a heading value for each column. Tip: If you create an Excel Table from your data, column headings are automatically added to columns with blank heading cells, and you can avoid this error. To find the problem, try these steps:
NOTE:
|
Pivot Table Overlap ProblemsAnother common pivot table error message warns about pivot table overlap problems.
You’ll see that Excel error message if pivot tables are one the same sheet, and there’s not enough blank space for one of the pivot tables to expand for new data. Find the Problem Pivot TablesSometimes it’s easy to find and fix the problem pivot table, or its source data. But, in a big workbook, with lots of pivot tables, and different data sources, it can be tricky to pinpoint the problem. To get an inventory of all the pivot tables in your workbook, with details on where they’re located, use the “List All Pivot Table – Details” macro to see the details for all pivot tables. The sample file is also available in the download section below That macro lists each pivot table in the file, with information about its location, size, and source data. If the source is a worksheet list or table in the same Excel workbook, the macro shows details about that source data. |
Duplicate Items in Pivot TableWhen you create a pivot table it groups the items from your data, and calculates a total for each group. Occasionally though, you might see duplicate items in the pivot table. Here are some reasons why a pivot table might show duplicates for text items, or for numbers Duplicate Text ItemsIn this example, there iare duplicates for one of the text items in the Row area -- Boston appears 3 times, instead of just once Even though these items look like duplicates, there is something different about them, and that’s why they’re appearing on separate rows in the pivot table. Usually, the problem in trailing spaces – one or more space characters are at the end of some items in the data, but not all of them. Clean the Source DataTo get rid of the duplicates in the pivot table, you’ll need to clean up the source data. However, the filters in an Excel table ignore trailing spaces, so it’s not easy to find the problem entries. There are detailed cleanup steps in this article on my pivot table blog: Duplicate Items Appear in Pivot Table Duplicate NumbersIf you see duplicate numbers in the Row area, it's usually because there are small, hidden differences in the numbers, caused by the floating point precision that's used in Excel. For example, this pivot table shows three numbers that look like duplicates, for the Carrot Bars. To learn more about this problem, go to the Remove Duplicates Problem page. You'll see why the duplicates are listed (floating point precision), and how to fix the problem by using the ROUND function. |
Couldn't Get Data ErrorA simple data change can cause a strange pivot table refresh error, if you added the pivot table data to the Data Model. Here's an edited version of that message, with some of the text moved, so you can read all of it, in this screen shot. The first couple of lines say this:
Fix the ProblemThis error message might appear if one of the source data headings was changed from UPPER case to Proper case (or any other type of case change). That can create a second instance of the field in the data model. To fix this problem, if you see this Excel error message:
More InformationFor the detailed steps on fixing this pivot table error, and ways to avoid the problem, go to the Pivot Table Refresh page. There is also a sample file that you can download, with a pivot table that uses the Data Model. |
Reference Isn't Valid ErrorRecently, when I opened an Excel file, an error message appeared, "Reference isn't valid". There was a chart behind the message, and I (incorrectly) assumed that was the problem. However, the error turned out to be a pivot table problem - the source data table was broken! I had to reformat the data as a named table, and that fixed things. See the details below, if you run into a similar problem. Pivot Table Source Data ProblemIn my workbook, a pivot table was causing the problem. The pivot table's source data was a table that no longer existed in the workbook. As soon as I fixed the table, the error message stopped appearing Fixing the Problem - DetailsTo fix the problem I did these two things, and there are detailed steps below: -- 1) Located the pivot table's data source -- 2) Found and fixed the problem in the source data 1) Locate Pivot Table Data SourceTo find the data source of a pivot table, follow these steps:
The Change PivotTable Data Source dialog box opens, and you can see the the source table or range in the Table/Range box. For my pivot table, it showed a table name - Table1 Usually, that table or range is highlighted in the background, but I could still see the pivot table in the background. So, I clicked the Cancel button, and went to the sheet where the data was stored. 2) Find Problem in Source DataWhen I checked the data sheet, there was no table - just a list on the worksheet. Nobody else uses the workbook, so how did the formatted Excel table go back to being just a list? Table Removed During Repair
Fix Problem in Source DataTo fix the Reference isn't valid error, I formatted the list as an Excel table again.
Next, I checked the Change PivotTable Data Source dialog box again, and the table was correctly highlighted in the background.
I clicked Cancel, and the error message didn't appear again, when I refreshed the pivot table. |
Download the Sample FilesNo Macros: To see the pivot table error message, download the Pivot Table Errors sample file. The zipped file is in xlsx format, and does not contain macros. List Pivot Tables Macros: To see how the macros work, and to get the sample code, download the Pivot Table List Macros workbook. The zipped file is in xlsm format, and contains macros. Enable macros when you open the workbook, if you want to test the macros. More Pivot Table TutorialsHide Error Values in Pivot Table How to Plan and Set Up a Pivot Table Pivot Table Details List Macros |
Last updated: April 8, 2023 12:55 PM