+ Reply to Thread
Results 1 to 12 of 12

Date data changes when I create pivot table

  1. #1
    Registered User
    Join Date
    08-09-2011
    Location
    Bay Village, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    55

    Date data changes when I create pivot table

    I'm using a pivot table to rearrange the data in a spreadsheet. When I do this, the info in the date field changes. I'm assuming I'm missing something simple in what I'm doing, but I am clueless as to what it may be. Insight from someone would be very much appreciated.
    I'm attaching a spreadsheet with an example. In the original data, all events are in 2015. The second worksheet shows how I created the pivot table. I copied and pasted as values, the info from the pivot table into the third worksheet and then formatted the dates as a custom format.
    Many thanks.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Date data changes when I create pivot table

    Hi -

    I'm not sure if this is the issue, but your pivot table sums the times for each match of event ID and event type. So Excel treats dates as numbers so it's adding the numerical values of the dates which will come up with some weird results when you have multiple matches. If you want a count of how many times an event occurs on a given date, then change the operation from sum to count.

    Is that the problem you are having?
    ____________________________________________
    If this has solved your problem, please edit the thread title to add the word [SOLVED] at the beginning. You can do this by
    -Go to the top of the first post
    -Select Thread Tools
    -Select Mark thread as Solved

    If I have been particularly helpful, please "bump" my reputation by pressing the small star in the lower left corner of my post.

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

    Re: Date data changes when I create pivot table

    just format the values in the pivot table to

    dd-mm-yyyy hh:mm:ss
    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.

  4. #4
    Registered User
    Join Date
    08-09-2011
    Location
    Bay Village, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    55

    Re: Date data changes when I create pivot table

    I really don't want to perform any mathematical calculation -- I am using the pivot table only to rearrange the data in the table so that the data for each Event Type is in the same column. Any other thoughts? Big thanks!

  5. #5
    Registered User
    Join Date
    08-09-2011
    Location
    Bay Village, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    55

    Re: Date data changes when I create pivot table

    Thanks -- I tried that and the values in the pivot table now appear as dates and times -- but still not always the correct ones.

  6. #6
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Date data changes when I create pivot table

    Hi -

    OK - if you want each time listed in the columns, drag the Time variable down into the ROWS area of the pivot table underneath the Event ID variable.

  7. #7
    Registered User
    Join Date
    08-09-2011
    Location
    Bay Village, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    55

    Re: Date data changes when I create pivot table

    I think I have to put the time data in the values section in order for it to appear in the correct column. (Unless I missed the boat on what you suggested.) This said, when I did what you suggested I found that the date info is correct if I add it as rows -- so the problem is not in some quirk in the times that isn't visible, but in how I'm using the pivot table.

  8. #8
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Date data changes when I create pivot table

    Yes - you need the time data in both the data section and in the rows section. Since each time is a unique value, putting the time data in the rows section will segregate each entry without adding them together (which is why you were getting weird dates like year 2045). Then you can do a little cleanup like suppressing any summary data for each category and suppress the grand total at the bottom. Format the time data in the pivot table as suggested by Oeldere above and you have it!

    Let me know if you need anymore help on this.

  9. #9
    Registered User
    Join Date
    08-09-2011
    Location
    Bay Village, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    55

    Re: Date data changes when I create pivot table

    Would it be possible for you to attach a spreadsheet with this? Thanks.

  10. #10
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Date data changes when I create pivot table

    Sure! See attached. Let me know if that's not what you were looking for.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    08-09-2011
    Location
    Bay Village, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    55

    Re: Date data changes when I create pivot table

    Ahhhh.... Now I'm with you! Huge thanks for all your help.

  12. #12
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Date data changes when I create pivot table

    Thanks for the bump! If you are satisfied with the result, please don't forget to edit the thread title to add the word SOLVED per the directions at the bottom of my post.

+ 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. Group by date and create new field in Pivot Table
    By Smally in forum Excel General
    Replies: 2
    Last Post: 08-10-2015, 07:55 AM
  2. Replies: 1
    Last Post: 07-22-2015, 07:16 AM
  3. How to create date RANGES in pivot table report filter?
    By TylerB2 in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 04-28-2015, 03:34 PM
  4. Is it possible to create a pivot table that data can be entered on?
    By zmbaker in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-09-2014, 11:35 AM
  5. [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
  6. create chart from pivot table data
    By Brontosaurus in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-18-2011, 04:51 AM
  7. How do i arrange the data to create a pivot table?
    By mr1176 in forum Excel General
    Replies: 1
    Last Post: 01-29-2006, 01:35 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