+ Reply to Thread
Results 1 to 3 of 3

Fixing date aggregation in pivot

Hybrid View

  1. #1
    Registered User
    Join Date
    12-14-2021
    Location
    Manchester, England
    MS-Off Ver
    2019
    Posts
    31

    Fixing date aggregation in pivot

    Hi,
    I am trying to aggregate the data in sheet 1 into a pivot table but when the dates don't aggregate by month.

    For example it will show a total of resources for dates 11/12/2022, 15/12/2022 and 17/12/2022. But it won't show the total for the month.

    I'd added into cell A21 (below the pivot table) of how I would like to show the pivot table with the months aggregated.

    Is there a way to do this? I've tried formatting the source column dates and doing text-to-column which does not seem to help!. I'm sure its because excel is not reading the dates properly so it is not giving me the option to break down the dates by day/month/year but I'm stomped!

    Any advice is appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Re: Fixing date aggregation in pivot

    Quite often the solution to Pivot Table problems can be solved with the source data. In this case, getting the last day of the month for the Planned Displacement Date.

    In this case, I converted your data into an Excel table because Excel Tables know how big they are. So when I added the helper column to the source data, the pivot table picked it up when it was refreshed.

    The helper column has the formula: =IF(NOT(ISNUMBER([@[Planned Displacement Date]])),"No Date",EOMONTH([@[Planned Displacement Date]],0)) - You can replace "No Month" with the null string "" if you like.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    12-14-2021
    Location
    Manchester, England
    MS-Off Ver
    2019
    Posts
    31
    Quote Originally Posted by dflak View Post
    Quite often the solution to Pivot Table problems can be solved with the source data. In this case, getting the last day of the month for the Planned Displacement Date.

    In this case, I converted your data into an Excel table because Excel Tables know how big they are. So when I added the helper column to the source data, the pivot table picked it up when it was refreshed.

    The helper column has the formula: =IF(NOT(ISNUMBER([@[Planned Displacement Date]])),"No Date",EOMONTH([@[Planned Displacement Date]],0)) - You can replace "No Month" with the null string "" if you like.
    Interesting! Many thanks bro! I added the helper column the main spreadsheet but I didn’t convert the data source into a table. I just expanded the column range to include the helper column in the pivot table and it worked like a charm!

+ 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] Pivot Table Measure (Text) without Aggregation?
    By NewYears1978 in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 10-06-2021, 01:17 PM
  2. [SOLVED] fixing x-axis with full 12 months in pivot bar chart
    By dogbural in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 08-01-2020, 10:25 AM
  3. [SOLVED] fixing dates stored as text for pivot tables
    By td3201 in forum Excel General
    Replies: 2
    Last Post: 05-22-2017, 10:18 AM
  4. Excel 2007 : Fixing Pivot Table Select Field Value Formats
    By SeanMulholland in forum Excel General
    Replies: 0
    Last Post: 12-02-2010, 06:30 PM
  5. fixing date formats
    By Lloyddobler in forum Excel General
    Replies: 2
    Last Post: 09-10-2009, 01:03 PM
  6. Fixing the date.
    By cs2883 in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 10-07-2005, 02:40 PM
  7. [SOLVED] Fixing Excel Pivot Table Crashes
    By stork in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-18-2005, 12:05 AM

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