• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Excel PivotTable Error Handling

You are here: Home / Excel PivotTables / Excel PivotTable Error Handling
November 6, 2017 by Mynda Treacy

Obviously, we don’t want our PivotTables littered with #DIV/0! and #NULL! errors if we’re presenting them in a report (like the one below), that would just create unnecessary questions and we’re busy enough.

Excel PivotTable error handling

Thankfully Excel PivotTable error handling is easy to control via the PivotTable Options; right-click the PivotTable > PivotTable Options >

error handling via the PivotTable Options

On the Layout & Format tab check the ‘For error values show’:

for error values show

Instead of the error you can show text, like ‘N/A’, a number or leave it blank. I usually leave it blank, as you can see in the image below, because this is most likely to be suitable for all errors. Whereas if you put a value like 0 or 1, then that may not be correct in every scenario.

error values left blank

Types of PivotTable Errors

In the PivotTable below, column F; ‘% Change’ is a ‘Show Values As’ calculation for ‘% Difference From…’, which is uses the following formula:

=(current month – previous month) / previous month

When the ‘previous month’ is zero we get the #DIV/0! error, and when the current month has no data we get a #NULL! error, as you can see below:

NULL error

#DIV/0! errors are triggered by dividing by zero. It’s the most common PivotTable error and is typically found in calculated fields or calculated items, or a calculation from the Show Values As options.

#NULL!, errors are triggered when a formula references an item that is blank. In the example above, you can see the source data for October is an empty cell (B15). You can fix this by replacing blank cells with zeros...but then you might end up with #DIV/! errors 🙂

Blanks – Notice Jan and Nov have blank results in the % Change column?

A blank is returned when the previous month is blank. And while this isn’t an error as such, some of you may prefer to see 100% or ∞, or some other value in there. After all, if you’ve gone from nothing to something (positive) then isn’t that an improvement?

Well yes, but that doesn’t mean you can represent the improvement in percentage terms.

Handling Percentage Change Where Prior Period is Zero

From time to time someone will ask me how they can override these blanks and display 100% change when the prior period was zero.

The answer to this question is always, “I’m not telling”! Not because I’m being mean, but because it would be wrong to show the percentage change from zero as 100%, or even 0%.

I don’t just leave them hanging with “I’m not telling”, I told you I’m not mean. 😉 I go on to explain why, like so:

Let’s say yesterday you had $0 and today you have $10. If you were to say that today you have 100% more $ than yesterday, then you’d be saying that you still have $0 because $0 + (100% x $0)  = $0, when in reality you now have $10.

Whereas if yesterday you had $5 and today you have $10, then you can say you have 100% more $ today because $5 + (100% x $5) = $10.

In other words, you can only calculate the percentage change from ‘something’, and zero is nothing. i.e. something is a number other than zero.

So, the accepted answer when calculating the change from zero is ‘not meaningful’ or leave it blank.

And before you think you can sneak 100% in the ‘For empty cells show’ field in the PivotTable Options, I’m happy to say that won’t work for the % Difference From empty fields.

Forward this tutorial to those you know who insist the percentage change from nothing to something is 100%?

Download the Workbook

Enter your email address below to download the sample workbook.

By submitting your email address you agree that we can email you our Excel newsletter.
Please enter a valid email address.

Download the Excel Workbook. Note: This is a .xlsx file please ensure your browser doesn't change the file extension on download.

Please Share

If you liked this please click the buttons below to share.

email icon twittericon fb icon LI icon

More Excel PivotTables Posts

Auto Refresh PivotTables

Auto Refresh PivotTables isn’t on by default, and the process differs depending on if your PivotTables is loaded to the data model or not.

Show Items with no Data in PivotTables

Show Items with no Data in PivotTables allows you to maintain a constant structure to your PivotTable or Pivot Chart axis when filtering.

Force Excel Slicers to Single Select

There's no build in way to force Excel Slicers to single select but we can use these clever warnings to persuade your users.
excel pivottable p&L

Excel PivotTable Profit and Loss

Creating an Excel PivotTable Profit and Loss Statement means you can use Slicers and Conditional Formatting and have the P&L automatically update.

Excel PivotTable Field List Tips

Customize the Excel PivotTable Field List to suit your needs. Find how to turn the PivotTable Field List on and off and other handy tips.

Hide Blanks in Excel PivotTables

Hide blanks in Excel PivotTables caused by empty cells in your source data. I’m talking about PivotTable cells containing the (blank) placeholder.
Excel Slicer Formatting

Excel Slicer Formatting

Excel Slicer Formatting is essential because they’re big and chunky. In this tutorial I show you how to make Excel Slicers small.
Excel PivotTable Quick Explore

Excel PivotTable Quick Explore

Drill down into data hierarchies using PivotTables and Pivot Charts with Excel PivotTable Quick Explore. New in Excel 2013 onward.
excel online pivottables

Excel Online PivotTables

Excel Online PivotTables are now available from the Insert tab of the ribbon. There are some limitations that are covered in this post.

Excel PivotTable Percentage Change

Excel PivotTable Percentage Change calculation is dead easy with Show Values As. Add conditional formatting, and Slicers for interactivity.
Category: Excel PivotTables
Previous Post:Excel PivotTable Percentage Change
Next Post:Plot an Equation in Excel Using PythonPlot an equation in Excel using Python

Reader Interactions

Comments

  1. Erin

    July 9, 2021 at 1:35 am

    Thank you for the information! I am wondering if there’s a way to over ride the blanks and put in a word. I want to indicate that an item was added and put “Added” instead of blanks. Is there a way to do this, or do I have to just leave the blanks? Thanks!

    Reply
    • Mynda Treacy

      July 9, 2021 at 8:56 am

      Hi Erin,

      Yes, just type in what you want to see instead of ‘blank’.

      Mynda

      Reply
  2. Patricia Gimmi

    February 24, 2018 at 11:29 pm

    Hello — working in Excel 2010 — for the pivot table, I have a column that has limited data in it. Where the column/field is blank, the pivot table displays (blank) even though I have checked the box ‘for empty cells show’ and left the input box blank. in order for the column to avoid displaying (blank), I put ‘— in the source table. What am I doing wrong? The source table will grow and I don’t want to put ‘— in manually for each new entry.
    Thanks for your help.
    Pat

    Reply
    • Mynda Treacy

      February 25, 2018 at 8:15 pm

      Hi Pat,

      You will see (blank) in a row label where that label is blank. The post above deals with errors in the values area of the PivotTable, not the row labels, as does the check box to ‘show empty cells as’.

      If you want to avoid blanks in the row labels then you must enter something in those fields, even if it’s a space. You can do this in the PivotTable; simply select any cell containing (blank) and type a space in it. This will replace all (blank) items.

      Mynda

      Reply
  3. Carlos Barboza

    November 8, 2017 at 9:28 am

    Hi Mynda, great article as always!, quick question: With pivot tables, do you go about with calculating Variances with Negative Numbers?

    For example, data pig on this article uses the function ABS() (absolute).

    Link: http://datapigtechnologies.com/blog/index.php/calculating-variances-with-negative-numbers/

    I been having reports with pivot tables, where variances with negatives does come right 🙁

    Reply
    • Mynda Treacy

      November 8, 2017 at 12:26 pm

      Thanks, Carlos!

      If I required more control over the calculation used for the variance I’d use a calculated field or calculated item, instead of the built in ‘Show values as…’ calculations available.

      Mynda

      Mynda

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Current ye@r *

Leave this field empty

Sidebar

More results...

Shopping Cart

mynda treacy microsoft mvpHi, I'm Mynda Treacy and I run MOTH with my husband, Phil. Through our blog, webinars, YouTube channel and courses we hope we can help you learn Excel, Power Pivot and DAX, Power Query, Power BI, and Excel Dashboards.

Subscribe to Our Newsletter

Receive weekly tutorials on Excel, Power Query, Power Pivot, Power BI and More.

We respect your email privacy

Guides and Resources

  • Excel Keyboard Shortcuts
  • Excel Functions
  • Excel Formulas
  • Excel Custom Number Formatting
  • ALT Codes
  • Pivot Tables
  • VLOOKUP
  • VBA
  • Excel Userforms
  • Free Downloads

239 Excel Keyboard Shortcuts

Download Free PDF

Free Webinars

Excel Dashboards Webinar

Watch our free webinars and learn to create Interactive Dashboard Reports in Excel or Power BI

Click Here to Watch Now
  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
 
  • About My Online Training Hub
  • Contact
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Copyright © 2023 · My Online Training Hub · All Rights Reserved

Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.

Download A Free Copy of 100 Excel Tips & Tricks

excel tips and tricks ebook

We respect your privacy. We won’t spam you.

x