+ Reply to Thread
Results 1 to 2 of 2

Custom date - pivot table data shows 0 days, yet chart is displaying this as 30days

  1. #1
    Registered User
    Join Date
    10-16-2019
    Location
    Newcastle, England
    MS-Off Ver
    2016
    Posts
    1

    Custom date - pivot table data shows 0 days, yet chart is displaying this as 30days

    I have created a pivot table in excel, displaying the average length of time something has spent in a certain area.


    To do this I have created a custom number format: d "Days" h"h and" m"m"

    The data in my pivot table is correct - showing values such as 0 Days 1h and 52m (which displays in the formula bar in the standard 00/01/1900 01:52:09 format for example)


    The issue I'm having is, when this data is collated into a pivot chart, this value is changed to appear as 30 Days 1h and 52m...


    What changes do i need to make to ensure the chart displays the data as it appears in the table? I'll post some screenshots to explain further...

    Thanks
    Attached Images Attached Images

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,885

    Re: Custom date - pivot table data shows 0 days, yet chart is displaying this as 30days

    Without sample (i.e. underlying data and how each field is set) bit hard to help you.

    But issue likely is due to lack of duration data type in Excel.

    Meaning, the value is treated as datetime value, and since Excel's earliest date is 1/1/1900... It has issue dealing with 1/0/1900 (12/31/1899).

    In value field, it's interpreted as 1/0/1900, but in pivot chart, it's interpreted as 12/31/1899. Hence, 30/31 in your label.

    Best way to deal with this, is to use different format. Ex. [h]:mm or as 0.00 where integer value shows # of days, and decimal portion represents time value.

    Unfortunately, Excel's sheet or data model can't deal with duration data type.

    d in custom formatting stands for DAY() i.e. Day of month and not # of days.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

+ 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 Chart shows date format as number
    By promo_dobbu in forum Office 365
    Replies: 1
    Last Post: 10-10-2019, 10:21 PM
  2. Dynamic chart for last 30days
    By Mr.Castle in forum Excel General
    Replies: 3
    Last Post: 07-13-2018, 04:41 PM
  3. Replies: 7
    Last Post: 01-31-2016, 07:45 AM
  4. SQL Pivot table shows percentages as date and time
    By mhf89 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 08-19-2015, 09:09 PM
  5. Replies: 0
    Last Post: 03-30-2012, 01:56 PM
  6. [SOLVED] Date formatting on a Pivot Chart's Data Table
    By [email protected] in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-23-2006, 10:55 AM
  7. Keep Pivot Table custom chart type
    By Jeff M in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 04-08-2005, 04:06 PM

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