+ Reply to Thread
Results 1 to 4 of 4

Pivot table Dates - extracting Month

  1. #1
    Registered User
    Join Date
    11-27-2021
    Location
    Western Canada
    MS-Off Ver
    Microsoft 365
    Posts
    6

    Question Pivot table Dates - extracting Month

    I hope this question belongs here as this was the only one I could find that seem to deal with Pivot Tables. If this is not the appropriate forum, then I do hope the mods will move it to the appropriate one. I am using Excel 365 and Win 10 Pro.

    I have one spreadsheet with a set of data following grocery prices for the last 6 months in 2021 and then another spreadsheet that overs the first 4 months of 2022. In the 2021 spreadsheet, when I create a Pivot table to summarize data by Dates, I can get a breakdown of the Date into Months, so that I can see a monthly summary - this is what I want. Then, I started a second spreadsheet for 2022 with the grocery expenses for that year. When I tried to do a Pivot table by Date and extract the Month from the Date to get a monthly report, I could not get this to work, so all I got was the individual dates (week dates). I am really puzzled why the ability to extract Month from the Date in one Pivot table based on date from the 2021 spreadsheet will give me a monthly summary, whereas this ability to extract the Month from the Date in the 2022 date is not possible. I have checked closely and the two spreadsheets have the data stored in the same columns and in the same format.

    Any suggestions as to what I might do to achieve the same results with the 2022 spreadsheet that I have with the 2021 spreadsheet, will be greatly appreciated. Thanks.

    WesternGuy

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Pivot table Dates - extracting Month

    If you right click on the 2022 Pivot - Date field - and select Group -- and you receive a Dialog that says "cannot group by..." this implies one or more values in the source range are not dates; conversely, if you can group, select Years & Months and "OK" -- this would indicate that the app settings have been changed such that new Pivots are no longer grouping automatically {this setting can be found within the Data area of Excel Options -- "Disable automatic grouping of Date/Time..."}

  3. #3
    Registered User
    Join Date
    11-27-2021
    Location
    Western Canada
    MS-Off Ver
    Microsoft 365
    Posts
    6

    Re: Pivot table Dates - extracting Month

    XLent, thanks for the reply. When you say that "this implies one or more values in the source range are not dates", does this mean that, if I get the response you indicate, then I can "fix it" by reformatting all the dates as "Dates"?

    WesternGuy

  4. #4
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Pivot table Dates - extracting Month

    hi, formatting a cell doesn't change the underlying data type -- you need to coerce the values (assuming they're valid, of course)

    first, just double check that your Pivot Range is only referencing the range it should be...

    if it is... try entering 0 in a blank cell, copying it, highlighting your date range then, Paste Special -> Operation: Add and click OK; then retry the grouping

    if the grouping is still not working you might want to post a sample of your troublesome date values for someone to take a look at.

+ 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. Sorting Dates by month, chronologically, on Pivot Table
    By JustMax in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-13-2020, 04:17 AM
  2. Replies: 8
    Last Post: 11-27-2016, 11:32 AM
  3. Pivot Table from Dates to Month
    By TCB in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 06-16-2015, 04:44 PM
  4. Group dates in Excel pivot table by month using VB.NET?
    By OldManExcellor in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-13-2015, 09:11 AM
  5. Count in Pivot Table by Month - with random dates in data source
    By lindsgray in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 01-08-2015, 04:49 PM
  6. Excel 2007 : Pivot table sum dates by month
    By pansovic in forum Excel General
    Replies: 1
    Last Post: 08-09-2011, 01:20 AM
  7. Pivot table - group dates per week or month
    By digicat in forum Excel General
    Replies: 1
    Last Post: 01-08-2006, 04:50 PM

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