+ Reply to Thread
Results 1 to 4 of 4

% Change from previous month not calculated properly

  1. #1
    Registered User
    Join Date
    12-04-2015
    Location
    california
    MS-Off Ver
    2013
    Posts
    21

    % Change from previous month not calculated properly

    I have percentage difference calculated from month to month. In the attached example, the change from Feb to March for the Digital Asset Management category goes from -548 to -628. It calculated the percentage change as 14.54% but that is wrong. Shouldn't that be -14.54% instead? Did I do something wrong when setting up the percentage difference?
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: % Change from previous month not calculated properly

    If the change was to a bigger negative, then I think the % needs to ner neg as well. If it is pos, then the negative got smaller
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: % Change from previous month not calculated properly

    Quote Originally Posted by dreamer001 View Post
    In the attached example, the change from Feb to March for the Digital Asset Management category goes from -548 to -628. It calculated the percentage change as 14.54% but that is wrong. Shouldn't that be -14.54% instead?
    Mathematically, no. But I understand why you would think so: you might think that movement to the left should be a percentage loss. That is how it works for positive numbers.

    But mathematically, -548.77*(1+14.5416%) = -628.57 approximately. So +14.4516% is indeed correct, mathematically,

    If you want Profit [sic] to be -14.5416%, I believe you need to change the Profit field to be a calculated field, with the formula: =(F8-D8)/ABS(D8). More reliably: =IFERROR((F8-D8)/ABS(D8),""). The result of the latter formula appears blank when D8 is zero. Alternatively, change "" to SIGN(F8). That displays 100% or -100% when D8 is zero and F8 is positive or negative respectively. Those alternatives are not mathematically correct; but they might appeal to your expectations.

    Unfortunately, I don't know much about pivot tables. So I cannot tell you how to implement the calculated field.
    Last edited by joeu2004; 12-13-2015 at 04:48 PM. Reason: cosmetic

  4. #4
    Registered User
    Join Date
    12-04-2015
    Location
    california
    MS-Off Ver
    2013
    Posts
    21

    Re: % Change from previous month not calculated properly

    That makes sense. Does anyone know how to create a custom formula within the pivot table? It won't allow me to insert new columns or modify the formulas of the cell values. Or is there a better way to approach this?

+ 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. Calculated field not working properly
    By ScottyZ92 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 10-16-2015, 04:08 PM
  2. [SOLVED] Formula to show change from previous month
    By karstens in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2014, 03:35 PM
  3. Replies: 12
    Last Post: 06-10-2013, 05:42 PM
  4. Calculated column in Table not replicating properly
    By GTretick in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 03-04-2013, 05:33 PM
  5. Macro using vlookups comparing 2 months paysheet(previous month and current month)
    By srinivasan1965 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-07-2012, 03:45 AM
  6. Replies: 5
    Last Post: 10-04-2012, 07:06 AM
  7. Replies: 4
    Last Post: 03-19-2012, 08:58 AM

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