+ Reply to Thread
Results 1 to 4 of 4

Pivot Table: How to create a Calculate Field that uses a "Difference From" column

  1. #1
    Registered User
    Join Date
    03-16-2010
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    3

    Exclamation Pivot Table: How to create a Calculate Field that uses a "Difference From" column

    Hi Everyone!

    I am no stranger to VBulletin forums, but this is my first time on this message board. It is great to see such a huge community of helpful people!

    It's 11PM, and I'm here at work with a problem that is boggling my mind. I am trying to create a calculated field in a PivotTable that refers to another column within the PivotTable that is a "Show Data As / Difference From / Prev / Year" value. My problem is that my new calculated field is not using the "Difference From" value, but rather the raw data value.

    I have attached a spreadsheet that contains a simplified example of my problem. Please note that the "Sum of COL2" column uses the option "Show Data As / Difference From / Prev / Year". I would like the "Sum of TEST" calculated field to equal the sum of "Sum of COL1" and "Sum of COL2", where "Sum of COL2" is the "Show Data As / Difference From / Prev / Year" value rather than the raw data value. I think my problem is that the "Show data as" option *shows* the data as a difference, but does not actually treat the data as such when performing calculations on the field.

    If anyone has any suggestions on how this can be done within the PivotTable, I would really appreciate it!

    Thanks!
    Attached Files Attached Files
    Last edited by vifferfun; 03-17-2010 at 08:43 AM. Reason: Clarified my question and added an example spreadsheet

  2. #2
    Forum Contributor
    Join Date
    03-12-2009
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 365
    Posts
    236

    Re: Pivot Table: How to create a Calculate Field that uses a "Difference From" colum

    could you post a dummy workbook with the same set up?
    If you can't figure out how a formula works, try stepping through it using "Evaluate Formula" in the Formula Auditing menu item in the tools menu!

    If you want to see where your code went wrong, try stepping through it by clicking in the code and pressing F8 and watch as the magic happens!


    If you are happy with any of the results, please add to the contributor's reputation by clicking the star icon.

  3. #3
    Registered User
    Join Date
    03-16-2010
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Pivot Table: How to create a Calculate Field that uses a "Difference From" colum

    Quote Originally Posted by Everstrivin View Post
    could you post a dummy workbook with the same set up?
    I have clarified my original question and added a simple example spreadsheet.

    Thanks!
    Last edited by vifferfun; 03-17-2010 at 08:39 AM.

  4. #4
    Registered User
    Join Date
    03-16-2010
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Pivot Table: How to create a Calculate Field that uses a "Difference From" colum

    <<merged with initial post>>
    Last edited by vifferfun; 03-17-2010 at 08:39 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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