+ Reply to Thread
Results 1 to 16 of 16

Date format in Pivot Tables

  1. #1
    Registered User
    Join Date
    03-07-2014
    Location
    Täby, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    8

    Angry Date format in Pivot Tables

    I have several Pivot Tables using the same data source in XL. The different tables interpret the dates differently. In one table it is shown as 2013-12 and in another table it is shown as 2013-12-31. I have tried to make sure that the format is the same in both tables and in the source, but still it is presented differently. What could possibly be wrong=

    Table 1:
    Row Labels
    2013-10
    2013-11
    2013-12
    2014-01-31
    Grand Total

    Table 2:
    Row Labels
    2013-10
    2013-11
    2013-12-31
    2014-01-31
    Grand Total

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Date format in Pivot Tables

    Are there different cell formats applied?
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  3. #3
    Registered User
    Join Date
    03-07-2014
    Location
    Täby, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Date format in Pivot Tables

    Thanks for your reply.

    I have marked the entire column in the source data sheet, and made sure the date format is YYYY-MM-DD, but then the Pivot Table still interprets the dates differently as shown above.

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

    Re: Date format in Pivot Tables

    Hi MaximusXL and welcome to the forum,

    I'd bet some of your dates are really text. Select the entire column of your dates (in the data) and show them as numbers. See which don't convert and then you'll know which are text instead of dates...
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  5. #5
    Registered User
    Join Date
    03-07-2014
    Location
    Täby, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Date format in Pivot Tables

    Thanks for your suggestion.

    It sounded like a good suggestion, but when a convert the entire column in my source data to numbers - all of them show up as numbers. And when I update the Pivot Tables it shows as numbers (which it should), but when I convert it back to dates, it shows up as before (above)...

  6. #6
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Date format in Pivot Tables

    Have you tested number format on pivot table sheet?

  7. #7
    Registered User
    Join Date
    03-07-2014
    Location
    Täby, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Date format in Pivot Tables

    Yes, that one was very intersting. Here it seems like only the dates shown as YYYY-MM-DD are converted to numbers. The other dates seem to be text formated. This is definitely a lead, but I can not understand how I should make them all in the same format...

  8. #8
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Date format in Pivot Tables

    You have refreshed pivot table and verified source data is range you are looking at?

  9. #9
    Registered User
    Join Date
    03-07-2014
    Location
    Täby, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Date format in Pivot Tables

    Yes, I have refreshed pivot tables and checked source data range.

  10. #10
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Date format in Pivot Tables

    May you post sample workbook?

  11. #11
    Registered User
    Join Date
    03-07-2014
    Location
    Täby, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Date format in Pivot Tables

    I have remeved most of the material, but kept the part that I have problems with. I think it should be clear...

    There is one sheet with data, 2 sheets with Pivot Tables, and 2 sheets with corresponding charts.
    Attached Files Attached Files

  12. #12
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Date format in Pivot Tables

    Slight differant approach.

    Why not use the month and year (and day) in differant cells.

    Than you also be able to compare differant criteria (e.g. months).

    See the attached example.

    I changed some data (marked with the bleu backgroundcolor).

    I add to columns (marked with the yellow backgroundcolor).
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  13. #13
    Registered User
    Join Date
    03-07-2014
    Location
    Täby, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Date format in Pivot Tables

    Thanks for your suggestion.

    Yes, I am sure that would work. My problem is that I have Macros importing and exporting data to and from this file. And I really do not like to rewrite the code. If nothing else works, I may do as you suggest, but I would prefer to understand the date format, if possible...

  14. #14
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Date format in Pivot Tables

    This is strange workbook. If I change pivot tables to not remember missing information and delete old dates, refresh, then put back old dates and refresh, everything is formatted correctly.

  15. #15
    Registered User
    Join Date
    03-07-2014
    Location
    Täby, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Date format in Pivot Tables

    This last comment sonds very interesting!

    But how do you "change pivot tables to not remember missing information"?

    And when you "delete old dates" - did you delete them in the source data or in the Pivot Table?

  16. #16
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Date format in Pivot Tables

    You right-click the pivot table, select Pivot Table options, select Data tab and change 'Number of items to retain per field' setting to 'None'. Data was changed in source data.

+ 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. Pivot Tables - need to do separate pivot tables for multiple sheets in same format
    By tconnell1965 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-18-2013, 07:04 AM
  2. Date formats in pivot tables using power pivot in Excel 2010.
    By myobreportguru in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 03-25-2013, 10:21 PM
  3. [SOLVED] Macro to update pivot item (date format) in pivot table to latest date from data source.
    By rocksan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-10-2012, 03:18 AM
  4. Replies: 1
    Last Post: 08-18-2009, 08:55 AM
  5. Conditionally format pivot tables
    By pickledmuffin in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-20-2007, 01:14 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