Contextures

Excel Pivot Table Errors

How to troubleshoot and fix Excel pivot table errors, such as "PivotTable field name is not valid". Find the pivot table problems, and fix them.

Introduction

Usually, 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 Valid

Sometimes, if you try to create or refresh a pivot table, an error message appears:

“The PivotTable field name is not valid. To create a PivotTable report, you must use data that is organized as a list with labeled columns. If you are changing the name of a PivotTable field, you must type a new name for the field.”

pivot table error field name is not valid

Pivot Table Source Data

If 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.

pivot table source data

Fix the Source Data

The 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 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:

  • In the Create PivotTable dialog box, check the Table/Range selection to make sure you haven’t selected blank columns beside the data table.
  • Check for hidden columns in the source data range, and add headings if they’re missing.
  • If there are any merged cells in the heading row, unmerge them, and add a heading in each separate cell.
  • Select each heading cell and check its contents in the formula bar; text from one heading may overlap a blank cell beside it. In this example, the Product Name heading overlapped the empty heading cell beside it.

missing heading in source data

NOTE:

  • If there are no blank heading cells, and you are using Excel 2003 or earlier, check for long headings – there is a limit of 255 characters in those versions

Pivot Table Overlap Problems

Another common pivot table error message warns about pivot table overlap problems.

  • “A PivotTable report cannot overlap another PivotTable report.”

You’ll see that 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.

pivot table overlap error

Find the Problem Pivot Tables

Sometimes 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.

basic pivot list macro

If the source is a worksheet list or table in the same Excel workbook, the macro shows details about that source data.

basic pivot list macro

Duplicate Items in Pivot Table

When 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 Items

In this example, there iare duplicates for one of the text items in the Row area -- Boston appears 3 times, instead of just once

duplicate items in pivot table

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 Data

To 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 Numbers

If 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.

pivot table shows numbers that look like duplicates

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.

Download the Sample Files

No 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 Tutorials

Hide Error Values in Pivot Table

How to Plan and Set Up a Pivot Table

Pivot Table Details List Macros

FAQs - Pivot Tables

List All Pivot Table – Details

Pivot Table Introduction

Clear Old Items in Pivot Table

go to top

Last updated: October 22, 2021 2:29 PM
Contextures RSS Feed