+ Reply to Thread
Results 1 to 6 of 6

calculation on data from pivot table

  1. #1
    Registered User
    Join Date
    06-22-2010
    Location
    ontario
    MS-Off Ver
    Excel 2007
    Posts
    16

    calculation on data from pivot table

    Hello there,
    I have a range of data that i entered in a pivot table.
    the data structure is : VariableA and a date field, for instance :
    VA date1
    VA date2
    VB date3
    VC date4
    VC date5...

    In the pivot table i have :
    VariableA in row labels.
    and twice the date in Sum Values.

    This format output data like this format :

    VariableA MinDate MaxDate
    VA date1 date2
    VB date3 date3
    VC date4 date5

    Now, i want to insert a field in the pivot table that calculate the difference in days between a fixed date and MinDate for each row.

    How i can achieve this?
    what is the best way, please?

    Why the 2 new fields MinDate and MaxDate doesn't appear in the field list in the "Insert calculated field" dialog box??

    thanks a lot
    Last edited by cesna123; 07-14-2010 at 12:06 PM.

  2. #2
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: calculation on data from pivot table

    The best way, in my opinion, is to create the formulae outside the pivot table. If the fixed date isn't in your source data it would be destructively difficult to hard-code the date into a calculated field or item, but a formula like =$A$1-G3 where A1 is your fixed date and G3 is within your pivot would just 'work'.
    CC


    If you feel really indebted please consider a donation to charity. My preferred charity is ActionAid but there are plenty of worthy alternatives.

  3. #3
    Registered User
    Join Date
    06-22-2010
    Location
    ontario
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: calculation on data from pivot table

    Hi Charlie,
    thanks a lot, i've tried what you just suggest.
    It worked but the problem is that VariableA is a long list.
    and the formula you gave me don't work on pasting it.

    any suggestions?
    thanks a lot

  4. #4
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: calculation on data from pivot table

    Sorry I didn't quite understand the feedback:
    It worked... the formula you gave me don't work on pasting it
    Perhaps you could upload an example showing what you're hoping to see - I can't really add any more if you don't.

  5. #5
    Registered User
    Join Date
    06-22-2010
    Location
    ontario
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: calculation on data from pivot table

    Ok,
    When i wrote your formula; the formula looked as :
    theFixedDateValue - Getpivotdata.

    The getPivotData Formula came automatically once i chosed a cell from the MinDate column.

    I cannot implement this formula manually for each row in the pivot table, because they are a alot.
    Neither i can copy and paste the formula of date difference,

    Is there another way?

  6. #6
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: calculation on data from pivot table

    you don't want getpivotdata, you just want a cell ref

    As I said - example is needed, otherwise my help is a total waste of time

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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