+ Reply to Thread
Results 1 to 5 of 5

Show difference between two columns of the same field in a pivot table

  1. #1
    Forum Contributor
    Join Date
    03-11-2021
    Location
    india
    MS-Off Ver
    365
    Posts
    154

    Show difference between two columns of the same field in a pivot table

    Hello

    I have a report with a "Month" column which is two months as strings, e.g August September.

    In the pivot table, I should the count of items in the Values with the "Month" field in the Columns section.
    This gives a count for August and a count for September.

    is there anyway I can include a calculated field to show the difference between these two, i.e. the September column minus the August column?

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,294

    Re: Show difference between two columns of the same field in a pivot table

    That would be a calculated item, not a calculated field (unless you are using the data model and create separate measures for each month...)
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Contributor
    Join Date
    03-11-2021
    Location
    india
    MS-Off Ver
    365
    Posts
    154

    Re: Show difference between two columns of the same field in a pivot table

    Ah ok.
    So I see "Month" the field list and when I click it I get "August" and "September" in the items list.
    But, adding the formula =September-August, I get error "PivotTable formulas can only refer to items in the same field as the calculated item."

    That seems to be the case, so I'm confused.

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,294

    Re: Show difference between two columns of the same field in a pivot table

    How/where are you adding the formula?

  5. #5
    Forum Contributor
    Join Date
    03-11-2021
    Location
    india
    MS-Off Ver
    365
    Posts
    154

    Re: Show difference between two columns of the same field in a pivot table

    Sorry, I didn't click Add before clicking ok.
    It works! Thank you for saving me.

+ 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 in a pivot table to show % difference between 2 columns
    By sa1ntj0hn in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-09-2022, 08:14 PM
  2. Replies: 8
    Last Post: 09-05-2019, 09:17 AM
  3. Replies: 1
    Last Post: 01-15-2019, 08:54 PM
  4. Pivot Table field show values as % of another value field
    By amotto11 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 02-27-2015, 04:31 PM
  5. Replies: 7
    Last Post: 08-04-2011, 09:32 AM
  6. [SOLVED] [SOLVED] show sereral columns of data field in pivot table
    By Linda in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 02-17-2006, 10:50 PM
  7. Replies: 7
    Last Post: 01-30-2005, 02:06 PM

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