+ Reply to Thread
Results 1 to 6 of 6

why pivot sum of isn't right?

  1. #1
    Registered User
    Join Date
    01-16-2014
    Location
    Phoenix, az
    MS-Off Ver
    Excel 2003
    Posts
    4

    why pivot sum of isn't right?

    I have 1 very simple table, and a very simple pivot table, but for some reason, the 'sum value of shares' pivot isn't calculating correctly on one of the cells (LAND)?

    Please see attached excel.

    I am keeping track of stocks. One of the tickers (LAND), I bought on 3 occasions, and sold on 3 occasions. To the point where I no longer have any shares.

    My pivot table shows the amount I wholly paid/sold (sum of paid) for each ticker, and then the amount of shares outstanding (sum of shares) for each ticker

    If you do the math...I have sold 100% of my 'LAND' shares, but the pivot table calculates that I have still have 1.11438....E-14 shares of the stock.

    Why is it not calculating out to be ZERO?

    I am very confused as to why this is.
    Attached Files Attached Files

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: why pivot sum of isn't right?

    1.11438....E-14 is more or less zero as it is very very small its to do with precision in excel
    you need to round your calculations mind you i cant see that in your pivot where is it showing?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    01-16-2014
    Location
    Phoenix, az
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: why pivot sum of isn't right?

    I certainly understand your reply. However, you cannot round in a pivot table. You cannot enter in a ROUNDUP or DOWN formula with a pivot table, you may only change the decimal places...on the surface, it will say 0.0, but deep down in the heart and soul of that cell, it will still be 1.11438...E-14.

    I am not sure what the issue is. But the correct calculation is ZERO, but the pivot table is saying its 1.1143...E-14

  4. #4
    Registered User
    Join Date
    01-16-2014
    Location
    Phoenix, az
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: why pivot sum of isn't right?

    Quote Originally Posted by martindwilson View Post
    1.11438....E-14 is more or less zero as it is very very small its to do with precision in excel
    you need to round your calculations mind you i cant see that in your pivot where is it showing?
    Sorry, it is showing at J5. Even though it shows 0.0000 if you look up at the formula area, it will say the exact number, which is the 1.11....E-14

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: why pivot sum of isn't right?

    having said that sumif gives the same result
    =SUMIF(B4:B21,"land",C4:C21)=1.11439E-14
    but subtotal when filter applied to column b gives 0
    i think its the way it calculates some of those -ve decimals something to do with floating point precision

    youll just have to accept thats the way excel calculates things,afaik ther is no fix
    heres an example of another
    42655.66-33256.06
    returns 9399.60000000001
    instead of
    9399.6
    http://en.wikipedia.org/wiki/Numeric...icrosoft_Excel
    Last edited by martindwilson; 01-16-2014 at 09:08 PM.

  6. #6
    Registered User
    Join Date
    01-16-2014
    Location
    Phoenix, az
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: why pivot sum of isn't right?

    hmm, maybe I just shouldn't use a pivot and create a second table

    this seems to work...
    =ROUNDDOWN((SUMIF(B4:B21,"land",C4:C21)),1)

    the formula will find land, sum it together, then round down to one digit, which will be 0

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Complex Request with Pivot Tables and copying pivot data to new page with formulas
    By Obsessed in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-07-2013, 09:16 AM
  2. Replies: 2
    Last Post: 05-24-2013, 03:58 PM
  3. Replies: 2
    Last Post: 02-20-2013, 08:27 AM
  4. Power Pivot with multiple pivot charts using different pivot data
    By Paul-NYS in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-10-2013, 10:18 AM
  5. [SOLVED] How does the term 'pivot' apply to Excel's Pivot tables and Pivot.
    By stvermont in forum Excel General
    Replies: 1
    Last Post: 02-18-2005, 10:06 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1