Apr 06 2022 06:20 AM
Apr 06 2022 06:20 AM
Looking for advice and help with Pivot table, I have several values that should be 0 (zero) but instead they are E values (for example -2.1316282072803E-14), and so I cannot filter them out as not a true Zero.
The total of the values below should be zero, instead I get -2.1316282072803E-14 ....
Grateful for any advice. Thank you!
Apr 06 2022 01:07 PM - edited Apr 07 2022 03:14 AMSolution
@Kasey07 ... 49 views and not one response yet! I'm surprised.
This is really a Pivot Table question. And I'm afraid that I know nothing about PTs.
The infinitesimal difference (-2.13E-14) is a common arithemetic issue (*).
It arises because most decimal fractions cannot be represented in binary "floating-point", the internal representation of numeric data in Excel. And the binary approximation of a particular decimal fraction might vary depending on the magnitude of the number. That is why, for example,
IF(10.01 - 10 = 0.01, TRUE) returns FALSE(!).
In general, the work-around is: when you expect a calculation to be accurate to some number of decimal places (probably 3 in your case), explicitly round to that number of decimal places -- and not to an arbitrary number of decimal places like 10.
But I do not know how to make that happen in a Pivot Table, in general. And someone who is knowledgeable about PTs might not be able to explain how unless and until you provide an Excel that demonstrates the problem. Use the "browse" link at the bottom of a reply frame; or upload the file to a file-sharing website, and post the download URL in a response here.
A dubious alternative is to set the "Precision as displayed" option (PAD).
It is "dubious" because there are some risks when that option is set, and because it does not always remedy the problem because it applies to the final value of formulas per se. In particular, I do not know if setting PAD remedies such problems with Pivot Table calculations per se.
In any case, if you want to experiment with setting PAD, be sure to make back-up copy of the file first, because merely setting PAD might change some constants irreversibly; and that might adversely change the results of some calculations unintentionally.
(*) We do not see an infinitesimal difference by summing the numbers that you posted. Nevertheless, it is possible to happen with a different set of numbers.
I suspect that one or more of the posted numbers is the result of calculations; and it is those calculations that differ infinitesimally from the result as it is displayed.
Both potential problems should be addressed by an appropriate change to the Pivot Table.
Again, I'm sorry that I do not know enough (anything!) about PTs to offer better guidance.
Hopefully, someone who knows PTs will respond soon. I suspect the remedy has something to with "calculated fields" in the PT.
Apr 07 2022 01:11 AM
Thanks @Joe User !
I did some research and saw the PAD option which I am not keen to do, as you say it is dubious.
I was hoping there is a solution as the total does equal absolute zero. Thanks again.
Apr 07 2022 01:44 AM
Aug 03 2023 04:51 AM
I had the same issue but for currency values. Changed the Number to Currency and issue resolved!! Thanks for the insights!