+ Reply to Thread
Results 1 to 10 of 10

How to show accurate weekly data in Pivot Chart?

  1. #1
    Registered User
    Join Date
    09-14-2017
    Location
    Dubai, United Arab Emirates
    MS-Off Ver
    Excel 2016
    Posts
    35

    How to show accurate weekly data in Pivot Chart?

    Hi All,

    I have created a pivot chart to show certain data in weekly format, however I face some issues..
    Please read below example:

    The last day of February in 2017 (28 February 2017) fell on a Tuesday and under week 9.
    The first day March in 2017 (1 March 2017) fell on the next day, Wednesday, and again under week 9.

    The last day of March in 2017 (31 March 2017) fell on a Friday and under week 13.
    The first day April in 2017 (1 April 2017) fell on the next day, Saturday, and again under week 13.

    Now my issue is that if I look at the weekly view on my Pivot Chart, then because of the above, I see week 9 in both February and March and week 13 in both March and April - which also results in incorrect data display.

    How can I correct this bug? Even if I select only the weeks on the slicer, the months are also shows and duplicate weeks (e.g. week 9 in both February and March and week 13 in both March and April).

    Attached the sample excel and a screen shot on what bug I mean exactly.

    Thanks a lot for any advice on how to fix this!
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,556

    Re: How to show accurate weekly data in Pivot Chart?

    If I understand correctly you would like to see only the number of appointments by week and year. If that is the case then deselect month and day on the pivot table field list.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

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

    Re: How to show accurate weekly data in Pivot Chart?

    I am not quite sure if this is what you want. First of all, I changed the data source to the Excel Table - only because tables know how big they are and they also copy down formulas.

    I created a helper column called Week Ending with the formula: =[@Date]-WEEKDAY([@Date])+7 - this is the Saturday following @DATE.

    Unlike the weekdays for a particular week number that can span across a month, a week end date must occur only in a single month. Then I redefined month to be associated with the week ending date =TEXT([@[Week Ending]],"mmm"). An example of the consequence is that the last week of June, Week 26, has a week end date of July 1. So week 26 is in July, even though 6 of the 7 of its days are in June.

    If you take away the + 7 and replace it with + 1 you get the Sunday date that starts the week. You might want to work it that way.
    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.

  4. #4
    Registered User
    Join Date
    09-14-2017
    Location
    Dubai, United Arab Emirates
    MS-Off Ver
    Excel 2016
    Posts
    35

    Re: How to show accurate weekly data in Pivot Chart?

    Quote Originally Posted by dflak View Post
    I am not quite sure if this is what you want. First of all, I changed the data source to the Excel Table - only because tables know how big they are and they also copy down formulas.

    I created a helper column called Week Ending with the formula: =[@Date]-WEEKDAY([@Date])+7 - this is the Saturday following @DATE.

    Unlike the weekdays for a particular week number that can span across a month, a week end date must occur only in a single month. Then I redefined month to be associated with the week ending date =TEXT([@[Week Ending]],"mmm"). An example of the consequence is that the last week of June, Week 26, has a week end date of July 1. So week 26 is in July, even though 6 of the 7 of its days are in June.

    If you take away the + 7 and replace it with + 1 you get the Sunday date that starts the week. You might want to work it that way.
    Hi dflak,
    No words again, you perfectly understood the issue and the solution perfectly solved it!
    Thanks a lot again - you are awesome!

  5. #5
    Registered User
    Join Date
    09-14-2017
    Location
    Dubai, United Arab Emirates
    MS-Off Ver
    Excel 2016
    Posts
    35

    Re: How to show accurate weekly data in Pivot Chart?

    Quote Originally Posted by dflak View Post
    I am not quite sure if this is what you want. First of all, I changed the data source to the Excel Table - only because tables know how big they are and they also copy down formulas.

    I created a helper column called Week Ending with the formula: =[@Date]-WEEKDAY([@Date])+7 - this is the Saturday following @DATE.

    Unlike the weekdays for a particular week number that can span across a month, a week end date must occur only in a single month. Then I redefined month to be associated with the week ending date =TEXT([@[Week Ending]],"mmm"). An example of the consequence is that the last week of June, Week 26, has a week end date of July 1. So week 26 is in July, even though 6 of the 7 of its days are in June.

    If you take away the + 7 and replace it with + 1 you get the Sunday date that starts the week. You might want to work it that way.
    Hi dflak,

    I would like to ask for your help again with the week number issue.
    Now that we entered 2018, I'm facing some issues with your solution above + another issue.
    Let me explain:

    2018 issue:
    Data recorded for 31 Dec 2017, falls on the last week of 2017 (week 53), but because the week ending of week 53 is 6 January 2018, therefore on the Pivot Chart, the data shows for this day like it happened on week 53 in January 2017.
    Please see screen shot as the first image and the yellow highlighted line on sheet MASTER DATA_excel table in the sample excel

    Misrepresentation of data issue:
    The last days of January 2018 (28-31) fall on the first week of February 2018 (week 5). But because of this, this data is also showing on week 5 (February 2018) on the chart. Which, if I put the cursor over that line in the chart, show that those data belongs to February 2018 (week 5), whereas it belongs to January 2018 (week 5).
    Please see screen shot as the second image and the orange highlighted line on sheet MASTER DATA_excel table in the sample excel

    Is it possible to fix these? I was playing around with many tricks - like using the month of the original date (column A) and not the month of the weekending date (column L), but doesn't work.

    Thank you in advance if you can help in this!
    Attached Images Attached Images
    Attached Files Attached Files

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

    Re: How to show accurate weekly data in Pivot Chart?

    I had the month defined in terms of Week Ending. I changed it to be defined in terms of the actual date. Check to see if this is what you want.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    09-14-2017
    Location
    Dubai, United Arab Emirates
    MS-Off Ver
    Excel 2016
    Posts
    35

    Re: How to show accurate weekly data in Pivot Chart?

    Quote Originally Posted by dflak View Post
    I had the month defined in terms of Week Ending. I changed it to be defined in terms of the actual date. Check to see if this is what you want.
    Thank you dflak!
    I tried this as well. It solves both issues, but unfortunately it also throws me back to my initial issue - where the last days of a given month and the first days of the next month falls on the same week number, therefore split on the pivot chart and shows the data inaccurately.
    Please see the screen shot from your file. The last days of November and the first days of December fall on week 48 and the data is split.

    I tried all kinds of IF condition, but I always face an issue. I have a fear only VB could solve this :|
    Attached Images Attached Images

  8. #8
    Registered User
    Join Date
    09-14-2017
    Location
    Dubai, United Arab Emirates
    MS-Off Ver
    Excel 2016
    Posts
    35

    Re: How to show accurate weekly data in Pivot Chart?

    Hi dflak,
    Any luck with this? (please see my reply to your comment above).
    I'm constantly researching and trying different things, but I'm always back to square one

    Or if anyone else has an idea how to solve this issue, please, don't hold yourself back

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

    Re: How to show accurate weekly data in Pivot Chart?

    I will have to re-familiarize myself with the data. I think your best bet would be to repost this as a fresh request, but *DO* cross-reference to this post. With 8 responses, people are less likely to jump on board because they figure that the issue is fairly well hashed out and that the solution is already far along down the line. It would be like trying to board a moving train.

    I have no issue with you posting that this needs a fresh pair of eyes on it. Maybe someone else can see something I do not.

  10. #10
    Registered User
    Join Date
    09-14-2017
    Location
    Dubai, United Arab Emirates
    MS-Off Ver
    Excel 2016
    Posts
    35

    Re: How to show accurate weekly data in Pivot Chart?

    Thanks for the feedback dflak!
    I will follow your suggestion and post a new thread and cross reference as well.

    Thank you!!

+ 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. Convert from Weekly to Monthly accurate to date
    By z3162238 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-16-2016, 10:53 AM
  2. weekly pivot chart with MS Query
    By Chris2250 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-13-2016, 04:51 PM
  3. Want to show source data for pivot chart in a table next to it
    By kmarie630 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 09-29-2014, 11:07 AM
  4. Pivot Chart show a simple percentage, see sample data
    By duugg in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 10-08-2013, 03:04 PM
  5. Cannot delete extra rows to provide accurate chart data
    By sonny.thind in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-09-2011, 02:38 PM
  6. macro for pivot chart to show filtered data
    By ghynes in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-08-2011, 08:08 AM
  7. [SOLVED] Help: pivot chart data in secured Access database wont show fields
    By A C in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 01-24-2006, 09:30 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