+ Reply to Thread
Results 1 to 10 of 10

Days to Months on a Pivot table

  1. #1
    Registered User
    Join Date
    08-25-2011
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    15

    Days to Months on a Pivot table

    Hi all,

    ..I have a pivot table that picks up "dates" in the format of dd/mm/yy.

    I would like the pivot table to report on these, but "summarised" into the respective month.

    Is it possible to do this within the pivot tanble itself, or would I have to create another column in my table an manually input the relevant month?

    Many thanks,

    Stu
    Last edited by Stuand; 09-26-2011 at 07:38 AM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Days to Months on a Pivot table

    Hello,

    you don't need another column. Right-click any date in the pivot table, then click "Group" in the context menu. In the ensuing dialog highlight Month AND Year (if your data spans more than 12 months!!) and hit OK. The pivot table will now group the data by year and month.

    If you don't group by year, then January 2010 gets lumped in with January 2011 etc.

    cheers,

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Days to Months on a Pivot table

    You can Group the PivotTable, right click on a cell in the Dates Column & choose Group
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    08-25-2011
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Days to Months on a Pivot table

    Hi both,

    ..thanks for the quick responset. However I have tried this and the arrow next to the "group and show detail" button is greyed out, and I keep getting the message "cannot grouip that selection"?..nb Excel 2003
    Stu

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Days to Months on a Pivot table

    This can be caused if you have empty cells in the column of data or the cells aren't formatted as dates

  6. #6
    Registered User
    Join Date
    08-25-2011
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Days to Months on a Pivot table

    Hi Roy,

    ..thanks for the tip. I have reduced the size of the pivot table, (ie to reduce the number of dates), and lo and behold it works a treat....many thanks....

    I have copied the dates over to another column, added "0", reformated them to make sure they are still dates, and pasted them back into the original column, but I still get an error message. This can only mean that some of the cells are stil not recognised as "dates"...is there a simple solution without having to re-type them all? (The cells have all been reformatted as "dd/mm/yy"

    again..many thanks

    Stu

  7. #7
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Days to Months on a Pivot table

    Stu,

    if the column contains dates, or text that looks like dates, you can select the column, then click Data > Text to columns > Next > Next > tick Date and select the appropriate order for DMY or MDY for your location and click Finish.

    That should ensure that all dates are real dates.

    Then check the Pivot table source and make sure that it contains only the rows with data, and no additional blank rows.

    cheers,

  8. #8
    Registered User
    Join Date
    08-25-2011
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Days to Months on a Pivot table

    Hi there again, and many thanks for your constructive help. I have now found that the problem was with "blank" lines. ie the table is only completed down to row "168", but I told the Pivot report to go dowmn to row "60000", as I thought this would make updating it only a matter of "refreshing th data".

    Is there any way for the pivot to automatically recognise that the table has "grown" as more lines are added? (Perhaps I should start a fresh post for this?)

    Thanks again,

    Stu

  9. #9
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Days to Months on a Pivot table

    You can create a named range that serves a dynamic data source to the Pivot Table.

    See here how it's done: http://www.contextures.com/xlpivot01.html

    cheers,

  10. #10
    Registered User
    Join Date
    08-25-2011
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Days to Months on a Pivot table

    ...brill...many thanks...will give it a go..

    Stu.

+ 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