Dashboards
Power Query
Power Pivot
April 24, 2020
Hello- I can't seem to get my dates to group. The grouping menus is grayed out and it does not automatically show any other date options when I drag the date field to the pivot. Currently using Excel/Microsoft 365. I have 3-4 sheets in my power pivot and have added a date table to the model and refreshed everything. Any thoughts? My date fields are also labeled with the correct data type and I don't see any errors. I am practicing with work data and only have about 2 months of data- so it's not a huge field to search. I'd ideally like the dates to group weekly (Monday-Sunday) and then perhaps monthly- currently I can use the 'month' option in the pivot table so that's not a problem. Thanks!
Nancy
July 16, 2010
Hi Nancy,
In Excel for Microsoft 365 the dates should automatically group when you drag a date field to the row or column areas of the PivotTable. This setting can be turned off in Excel Options > Data tab > 'disable automatic grouping of date/time columns in PivotTables', but this doesn't disable grouping completely.
I'd say there is something wrong with the data in the date columns. If you didn't load it via Power Query then it's possible to set the data type as date even when the values aren't dates e.g. they might be text that looks like a date, but isn't a date serial number that Excel recognises as a date.
In your PivotTables are you using the date fields from the date table or your fact tables? If there's a problem with the dates then it's most likely in the fact tables, as any date table you built should contain proper date serial numbers.
One way to check if you have text or proper date serial numbers is to go to the raw data sheet i.e. the source data that was loaded into Power Pivot, press CTRL+` to 'show formulas'. If they're proper date serial numbers they'll be displayed as a 5 digit number as opposed to the date format. Press CTRL+` again to revert back.
I'm just stabbing in the dark without seeing your file though. If that's not it, are you able to share your file or at least a sample file so I can reproduce the issue?
Mynda
Dashboards
Power Query
Power Pivot
April 24, 2020
Hi again and thanks the quick response. I did verify that the automatic grouping is NOT disabled on my excel options. I've also confirmed that the date formula on the fact sheets is the 5 digit date formula on all the fact sheet that have a date. I made a sample without personal identifiable info into this power pivot (attached) with two of the sheets I'm using and imported them as a linked Excel sheet in the Power Pivot data model here. I still cannot group the dates manually (the dialogue box is still grayed out) and it won't group automatically when I drag the date field to the row area. I am using the date in my date table and have it referenced to the other date fields in the fact sheets and I've also tried using the dates on the fact sheets and it still doesn't work. I'm needing to group the data by week (Monday-Sunday) and have been able to do it in a regular pivot manually by grouping a 7 day period and giving it a start date. At a loss for the Power Pivot and it seems I should still be able to do this. Appreciate any help, Thanks!
July 16, 2010
Hi Nancy,
Ah, you can't group by days in Power Pivot, sorry. I've never tried to group by days in Power Pivot, so this limitation was new to me.
You can only group by days with regular PivotTables. You can group by month though.
If you want to group by days in a Power Pivot model, then you'd need to add the 'week' field to your dates table that assigns each date to a week number.
Mynda
1 Guest(s)