+ Reply to Thread
Results 1 to 4 of 4

Pivot Table - Group Columns by Custom Dates

  1. #1
    Registered User
    Join Date
    01-24-2020
    Location
    Melbourne, Australia
    MS-Off Ver
    365
    Posts
    2

    Pivot Table - Group Columns by Custom Dates

    Hi All,

    Hoping someone would know the answer to this because Google certainly doesn't. I am not even sure if this is possible in Excel, but I am wondering is it possible to custom group values by between date in a Pivot table.

    For example, I would like one column to show values between dates (01/07/2017 - 30/06/2018) and a second column to show dates between (01/01/2019 - 30/06/2019). In other words, I would like to use my own custom 'between' dates and have them displayed in separate columns.

    My terrible Excel representation below:

    Names | Column A (01/07/2017 - 30/06/2018) | Column B (01/01/2019 - 30/06/2019)

    Hope someone knows the answer!

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Pivot Table - Group Columns by Custom Dates

    Quick and dirty method:
    1. Add Date as a column field.
    2. Manually select the first range of dates you wish to collate (01/07/2017 - 30/06/2018)
    3. Right click > Group.
    4. Rename Group if required.
    5. Repeat 2-4 for second range of dates (01/01/2019 - 30/06/2019)
    6. Remove Date from Columns (leaving Date2)
    7. Filter Column Labels to include only Group1 and Group2.

    Better solution:
    Add the date group as a field in your source data. Use that Group in your column field.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    01-24-2020
    Location
    Melbourne, Australia
    MS-Off Ver
    365
    Posts
    2

    Re: Pivot Table - Group Columns by Custom Dates

    Hi Olly,

    Thanks for your response. Glad to know that there is a solution to this.

    If you could kindly elaborate slightly on the steps (sorry I'm still learning)

    When you say create a 'Date column' do you mean in the source data or in the Pivot table? I am not sure how to create a column in the Pivot table?

    Also, when I Group them in the pivot, which option should I be selecting Years, Quarters or Months? Also dates?

    Would you be able to clarify more details also on how to do the below?
    6. Remove Date from Columns (leaving Date2)
    7. Filter Column Labels to include only Group1 and Group2.

    Thanks again for your help

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Pivot Table - Group Columns by Custom Dates

    Hey cola,

    Read https://excelchamps.com/blog/group-d...a-pivot-table/

    Date ranges should be equal in span. See if the link above shows what I mean.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ 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. Cannot group dates in pivot table
    By Hitman Hotrods in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-20-2018, 07:11 PM
  2. Pivot Table dates won't group
    By john0418 in forum Excel General
    Replies: 5
    Last Post: 11-13-2017, 01:12 PM
  3. Pivot table won't group dates
    By hwishman in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 08-25-2015, 06:37 PM
  4. Pivot Group Dates - how to remove start and end dates from table
    By markoloughlin in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 08-21-2012, 04:19 AM
  5. Pivot table group dates
    By RD Wirr in forum Excel General
    Replies: 3
    Last Post: 07-22-2006, 03:10 PM
  6. [SOLVED] Pivot table custom formatting of group levels
    By DannyG in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-18-2005, 10:06 AM
  7. Pivot table custom formatting of group levels
    By DannyG in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-16-2005, 10:42 AM

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