+ Reply to Thread
Results 1 to 17 of 17

Pivot Table Glitch with Distinct Grand Total on Dates?

  1. #1
    Registered User
    Join Date
    03-20-2006
    Posts
    38

    Pivot Table Glitch with Distinct Grand Total on Dates?

    I'm using Excel 2013.
    I have a pivot table with a client_id row and distinct counts of visit_dates for each client. The Grand Total of the distinct counts gives the grand total of the overall distinct dates rather than the sum of all the distinct totals for each client.
    For example:
    Client_1 has a count of 3 distinct dates.
    Client_2 has a count of 2 distinct dates..
    Client_3 has a count of 2 distinct dates.

    If the same date is shared by more than one client Excel counts it as 1 instead of 2. For instance: both Client_1 and Client_2 have the date 4/1/2017. The grand total of the pivot will be 6 when it should be 7.

    I don't see that outcome when counting other formats besides dates. That column is actually formatted as general but the values are in format 99/99/9999.

    Is this a known glitch?

    Please let me know if I need to provide more info or make the problem clearer. It's not that big of a deal since I can delete the generated grand total and total the counts.

    Thanks.

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Pivot Table Glitch with Distinct Grand Total on Dates?

    Attach a sample workbook (not a picture!). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Registered User
    Join Date
    03-20-2006
    Posts
    38

    Re: Pivot Table Glitch with Distinct Grand Total on Dates?

    I attached a workbook with 4 sheets - Before,After(with incorrect grand total), Desired, and an extra.

    Thank you.
    Attached Files Attached Files

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

    Re: Pivot Table Glitch with Distinct Grand Total on Dates?

    f2 =A2&C2

    g2 =countif($F$2:$F2,$F2)

    select column 2 in filters and filter on 1.

    see the attached file.
    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.

  5. #5
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Pivot Table Glitch with Distinct Grand Total on Dates?

    Your Dates are as text not as Date format
    (time also)

  6. #6
    Registered User
    Join Date
    03-20-2006
    Posts
    38

    Re: Pivot Table Glitch with Distinct Grand Total on Dates?

    Thanks, oeldere.
    I understand most of your fix. I'm still trying to figure out "select column 2 in filters and filter on 1." I'll get that after spending time on it.

    Is the Excel pivot supposed to generate the grand total of the distinct count of dates I was getting? Is that a bug or is that the correct outcome?

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

    Re: Pivot Table Glitch with Distinct Grand Total on Dates?

    Did I understand your question right?

    You want non duplicated values (same item and date).

  8. #8
    Registered User
    Join Date
    03-20-2006
    Posts
    38

    Re: Pivot Table Glitch with Distinct Grand Total on Dates?

    Yes, I see that the format is text or general.

  9. #9
    Registered User
    Join Date
    03-20-2006
    Posts
    38

    Re: Pivot Table Glitch with Distinct Grand Total on Dates?

    Yes, I want non duplicate values. If an item has the same date listed twice, it should be counted as 1.

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

    Re: Pivot Table Glitch with Distinct Grand Total on Dates?

    Then I think you have to add the helpcolumn as I did to get the result.

    I don't think that can be done (only with pivot table).

    A long time ago I saw a option for unique values in the value box, but never seen that since.

  11. #11
    Registered User
    Join Date
    03-20-2006
    Posts
    38

    Re: Pivot Table Glitch with Distinct Grand Total on Dates?

    OK, I thought distinct would count unique values.

    Thanks to both of you for your help.

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

    Re: Pivot Table Glitch with Distinct Grand Total on Dates?

    You're welcome. We appreciate the feedback!

    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

    Thanks for the rep.

  13. #13
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Pivot Table Glitch with Distinct Grand Total on Dates?

    Here is solution with PowerQuery (no additional columns)

  14. #14
    Registered User
    Join Date
    03-20-2006
    Posts
    38

    Re: Pivot Table Glitch with Distinct Grand Total on Dates?

    I'll check out PowerQuery. I've never used it but shouldn't have any trouble with it. I write a lot of SQL queries.

  15. #15
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Pivot Table Glitch with Distinct Grand Total on Dates?

    Good luck with PowerQuery (very usefull tool)

    thanks for rep.

  16. #16
    Registered User
    Join Date
    03-20-2006
    Posts
    38

    Re: Pivot Table Glitch with Distinct Grand Total on Dates?

    I've already marked the thread as answered and it is answered. I want to add some clarification. I tried another pivot but with a distinct count of data in another format besides mm/dd/yyyy. I get the same results. I had thought I had gotten different results in the past with the grand total of distinct counts but must have been mistaken. When I asked the question, I had thought that Excel was doing something different with dates (even though that date column was not formatted as date). Apparently that is the usual result with the pivots.

    It's resolved now. Thanks again.

  17. #17
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Pivot Table Glitch with Distinct Grand Total on Dates?

    Dates in Excel are numbers. Dates as Text is text and pretend only to be dates. 99/32/64 as text can be treated as date. Weird values but format is ok, isn't it?
    IMHO, Date and Time should be correct entered as date/time (number) or converted to this.
    If any formula depends on date and does not work then what do you do? After all, there is a date and it does not matter whether it is a number or a text, after all it looks like a date.
    Your case is a special case, independent of date.

    But...
    If data will be correct entered everywhere, everytime - this forum would be half-dead
    Last edited by sandy666; 09-08-2017 at 04:42 PM.

+ 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. More than one grand total in a pivot table
    By kmb100 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-12-2017, 10:01 PM
  2. Replies: 6
    Last Post: 09-29-2015, 08:44 PM
  3. Different grand total in pivot table
    By arn0ldas in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-13-2015, 01:35 AM
  4. [SOLVED] Is it possible to have both Grand Total and Grand Average in a Pivot Table?
    By ANS in forum Excel Charting & Pivots
    Replies: 15
    Last Post: 10-16-2012, 05:15 AM
  5. Pivot Table Grand Total
    By coolzero in forum Excel General
    Replies: 1
    Last Post: 06-25-2010, 03:46 AM
  6. Pivot Table - Sub Total & Grand Total Filter
    By ramki in forum Excel General
    Replies: 1
    Last Post: 08-07-2009, 11:40 PM
  7. [SOLVED] % of Running Total to Grand Total in Pivot Table
    By David in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-17-2005, 04:05 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