+ Reply to Thread
Results 1 to 6 of 6

Pivot grouping - only by day not working?

  1. #1
    Registered User
    Join Date
    11-30-2013
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    58

    Pivot grouping - only by day not working?

    Hi there,

    I am trying to group my pivot data by week - to do this I need to choose days and start/end date. But it's greyed out and not working?

    By month/year is working.

    The dates are all in dd/mm/yyyy format.

    Any ideas?

    Thanks

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

    Re: Pivot grouping - only by day not working?

    My guess. You are loading your pivot table from data model. For various reasons, it does not allow custom grouping using date range.
    If you want to keep using data model, you'd want date dimension table in data model to be used as relationship table (for grouping purpose) and add appropriate measures.

    Otherwise, if you bring in data to Pivot Table using Excel Table/Range without going through data model. You'll have option to customize date grouping.

    Edit: Is your profile correct and that you are using Excel 2007? If so, above is not the case, and I can't help you. If it is later version of Excel, please update your profile.
    Last edited by CK76; 04-25-2018 at 11:30 AM.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Registered User
    Join Date
    11-30-2013
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    58

    Re: Pivot grouping - only by day not working?

    Thanks. That is right; I am using data model. I would like to keep using this (due to the transforming I am doing on the data). So how do I add a date dimension table to it? It has the data stored as dd/mm/yyyy in the data model already.

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

    Re: Pivot grouping - only by day not working?

    You need separate date dimension table and build relationship in the model.

    How is data brought into data model? Is it directly in PowerPivot? Or through PowerQuery/Get & Transform?

    If former, you'll need to build date dimension table in Excel sheet, and load that into data model.
    If latter, you can use M to dynamically create date dimension table based on date range present in data set.

    Sample M, with manually supplied Start date for single year, assuming Sun-Sat week.
    Please Login or Register  to view this content.
    If you need further help, I'd need you to supply sample workbook with enough data to demonstrate your need.

    Edit: StDate is parameter value, set to "1/1/2018".
    Last edited by CK76; 04-25-2018 at 12:39 PM. Reason: See Edit:

  5. #5
    Registered User
    Join Date
    11-30-2013
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    58

    Re: Pivot grouping - only by day not working?

    Hi - I have added a time dimension into the model and also built relationships to it.

    However, I can only still group by days and the start/end date and number of days to group is still greyed out.

    See attached.

    Thanks again
    Attached Files Attached Files

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

    Re: Pivot grouping - only by day not working?

    Few things.
    1. You should append 2018 data to 2017 table in PowerQuery before loading to data model.

    2. You don't have Weeknumber column in dimension table. This is required to align each year's data on weekly basis.

    3. Since your raw data is already aggregated at week level, you should not use date or Month level aggregation (it will never align well and will be misleading).

    4. Don't use attribute generated grouping. Rather use column from dimension table for your row field.

    I'm bit busy, but will see if I can find time to modify your model.

+ 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. Excel Working out formula based on grouping - Help
    By champaben in forum Excel General
    Replies: 3
    Last Post: 07-28-2017, 01:11 PM
  2. Pivot Time grouping not working
    By SwissExcel in forum Excel General
    Replies: 2
    Last Post: 07-26-2016, 02:22 AM
  3. date grouping not working in pivot table
    By stephme55 in forum Excel General
    Replies: 2
    Last Post: 05-24-2016, 10:01 AM
  4. Replies: 1
    Last Post: 07-22-2015, 07:16 AM
  5. Replies: 4
    Last Post: 07-26-2014, 02:35 AM
  6. Macro and grouping not working in Protected sheet
    By ranjuv in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-28-2012, 06:49 AM
  7. Grouping amounts based on working days
    By obionenairobi in forum Excel General
    Replies: 9
    Last Post: 10-02-2010, 05:00 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