+ Reply to Thread
Results 1 to 6 of 6

calculated field for last 2 columns

  1. #1
    Registered User
    Join Date
    11-16-2012
    Location
    hyderabad (india)
    MS-Off Ver
    Excel 2010 32-bit
    Posts
    47

    calculated field for last 2 columns

    Hi All,
    i've month wise sales data at different dayparts which i regularly update every month. I need a calculated field which calculates the difference of last 2 month columns. So when i update a new month, it should take the latest month & previous month difference. Data as attached.
    Attached Files Attached Files
    Last edited by raja_puligadda; 01-08-2017 at 07:52 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,904

    Re: calculated field for last 2 columns

    Please add your expected outcomes to the sheet you have attached.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    11-16-2012
    Location
    hyderabad (india)
    MS-Off Ver
    Excel 2010 32-bit
    Posts
    47

    Re: calculated field for last 2 columns

    Thank you for the reply..attachment revised

  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: calculated field for last 2 columns

    I would use a vertical arrangement and convert the range of data into a table with an added calculation for the difference between months. In addition, change the dates in column A to be real dates that Excel recognizes. In the new column (column D) add this formula and fill down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Make the Pivot Table source the table that is created above. That will allow an easy refresh to accommodate new data added to the table.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  5. #5
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: calculated field for last 2 columns

    Firstly insert table range in main data.
    I use between your Pivot table last & last butone column data in another cell with formula, when ever you add data in your main data table & in Pivot table click on "Refresh All", accordingly change the range with last & last butone column data. See attach file.
    Attached Files Attached Files


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  6. #6
    Registered User
    Join Date
    11-16-2012
    Location
    hyderabad (india)
    MS-Off Ver
    Excel 2010 32-bit
    Posts
    47

    Re: calculated field for last 2 columns

    Don't know how to open the attachments. It is in some php format.

+ 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. [SOLVED] Count Columns in Pivot Table as Calculated Field
    By probablyjoel in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 08-20-2015, 03:16 PM
  2. [SOLVED] Using Calculated Field to Express % Change in Pivot Table Columns
    By eadamquinn in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 06-17-2015, 11:32 PM
  3. Pivot Table Calculated Field based on 2 columns
    By OldMan62 in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 06-09-2014, 07:59 AM
  4. Replies: 0
    Last Post: 11-25-2013, 03:41 PM
  5. Replies: 0
    Last Post: 10-24-2013, 10:59 AM
  6. Calculated Field to get Percentage of Two Columns in a Pivot Table
    By mbhc77 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 10-04-2013, 06:32 AM
  7. Adding an IF formula to a calculated field - columns with common names
    By milleniummanp7 in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 06-21-2013, 01:16 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