Unable to automatically group dates in Excel 2010 Pivot Tables - excel

I have an Excel document stored on the network drive.
I have a field called "delivered" formatted as date and I'm 99% confident it's actually a date. =TYPE confirmed it as a number, used Datevalue and posted over the source to make absolutely sure.
I have placed "delivered" in my row labels. I have sorted it to confirm that it's sorting as a date. When I select the drop down for Row Labels "Date Filters" is an option that appears.
I do not have missing, blank, or error values in the source data for the field "delivered."
With all that said, when I right click on a date value in the rows and select "Group" it tells me that I cannot group the selection. And "Group Field" in the ribbon is greyed out.
I've refreshed the pivot table, I've restarted Excel, but no luck.
Help? :(

Looks like there is a stray text value amongst the dates. To find it, sort the pivot table (not the source table) by the date column with A-Z as the sort order. Any text will be listed before the dates.

Related

Excel Pivot - spanning field name across all relevant columns

I have a table of employees with their work location (state initials) and their work status (FMLA leave, part time, full time). I've made a pivot table so that I can see the number of employees in each state relative to their status. Making the pivot table is easy, and it looks like this:
My question relates to the column field name cell (highlighted in red). When the table is first created, Excel auto fits the columns. However, if you look at the picture, it is clear that ideally the FMLA, FT, and PT, columns should all be the same size for the table to look good. I can resize the columns, of course, and set the table to not auto size when it refreshes.
When I resize the columns the table now looks like this:
Two problems with the new layout. First, it is not clear at all that the "Employee Status" field name applies to all three columns FMLA, FT, PT. Second, with the first column being narrower "Employee Status" no longer fits. In Excel 2013, the field name is limited to just its column. In Excel 2016 it spills over to the next column, but has the filter pulldown in the middle of it! And of course the formatting doesn't spill over.
In a non-pivot, I would "merge" the three cells above the column headings and make "Employee Status" span all three cells. Leading to a much more intuitive look. However, "merge" cannot be used in pivot tables. My only work around at the moment is to Hide the row with the field name, and put a new row above it that is not part of the pivot table. Ends up looking good, but of course, it will not dynamically adjust if a new value is added to "Employee Status".
I'm looking for other recommendations on how to format this table so it ends up looking like this:
Ideally solution will work with Excel 2013, which unfortunately is what I'm limited to.

Excel PivotTable bug? If Text column of source table has a month name, it breaks the A-Z sort in the pivot table

I have an Excel file which I can share with you, but here is how to recreate it:
In a workbook tab, create a table called "DataTable" with the two "Company" and "Score" columns as shown below.
Format the "Company" column explicitly as "Text". You can even precede the entries with single quotes to force Excel to treat them as Text: it won't change the behavior.
Below this table, create a simple PivotTable on "DataTable" with "Company" as a Row Field and "Sum of Score" as a Value Field.
In the PivotTable, Sort the "Row Labels" (Company) field "A-Z".
You will see this, where the values "DEC" and "SEP" bubble to the top above the other A-Z values:
What apparently is happening is that Excel insists on treating anything that looks like a month name or abbreviation as its numeric equivalent, which sorts above the other A-Z text values.
Question 1: Is this a confirmed bug?
Question 2: How can I keep the desired values (like "SEP") but stop this from happening?
I am happy to upload an actual simple spreadsheet which shows this behavior. Thanks!
Click on Row Labels Filter
Select More Sort Options
Select More Options (Bottom Left)
Uncheck Sort Automatically every time the report is updated
Ensure First key sort order = No Calculation
Refresh Pivot Table
That's because Excel thinks SEP and DEC are months names and sorts them according to Custom Lists. To prevent this, you need to go to PivotTable -> Options and uncheck Use custom Lists when sorting in the Totals & Filters tab

How to hide blank rows from pivot-table so that the pivot-chart does not contain that row?

scenario: I have a pivot-table with years in rows and sales in values. Additionally I have sales as Difference to previous year (built-in pivot function "show as ...") in values.
It works fine, but the first row in the pivot-table is blank for sales and sales-diff. It is obvious, because there is no year before the first year, so the first row is blank.
scenario: If I remove the sales and keep the sales-diff in values then the entire first row in the pivot-table is blank except for the year.
The option "Show elements without data" under year field-options is deactivated! Still the blank row is there.
Now when I make a pivot-chart the blank row is also shown in the chart. I could hide the entire blank row in the worksheet, but it does not affect the chart.
I could also make another non-pivot-table on top of the pivot-table and take it as the data source for the charts. But I prefer not to complicate the thing.
So the question is: how can I get rid of the blank row in pivot-table and more important in the pivot-chart?
Excel Version in use: 2013, 2016, 2019, 2019 365
Thanks for any help.
I ran into the same issue, and was able to resolve it. Providing my answer here to hopefully help anyone that might be having the same issue. The way I did it is as follows:
At your source table, fill your "blank" cells of the column added in the Pivot Rows field (Row Label) with any text (I used "Not Applicable").
Once your Pivot Table is established, select to filter "Filter by Labels" from the "Row Labels" drop-down menu.
Select "Does Not Contain" from the sub-menu.
Enter the identifying text used to fill the blank cells with. (In my case, I entered "Not Applicable".
Click "OK".
Now your Pivot Table will no longer show the row with blank label, and it will not show in the Chart, as well; even if slicers are used and selections are changed.

Filter column for substring and return max of adjacent cells -- Excel 2013 (no macros)

I would like to obtain the max call time that was on each day, the average of all the calls that day, and any calls that exceeded 20 seconds.
Due to the security policies at work I am limited to the formulas provided by excel, I can't use macros or VB (otherwise I would just write something suitable). I don't have much experience with excel, so I apologize if this is a simple one. I have tried to find ways to search and return a subarray that I could easily manipulate, but it seems the only way to do that is with macros. Currently I think I can use VLOOKUP, but I don't really understand enough about it know if I can use this with another function.
Essentially, if there is a formula or a combination of formulas that I can use that will allow me to collect all data from column B that shares the same values in column A, I could nest that in the formulas I need to calculate the data.
Any help is appreciated!
This can be done with a pivot table in just a few clicks.
First, turn the source data into an Excel Table object, by selecting one cell in the table and then using Insert > Table or Ctrl-T. Add a helper column for the calls over 20 seconds. Let the column be "long calls" and the formula
=IF([#Duration]>TIME(0,0,20),1,0)
Then, with a cell of the Excel Table selected, click Insert > Pivot Table. (The pivot table is now linked to the Excel Table object and when more data is added you can refresh the pivot table without having to change the definition of the source data.)
Drag the Day field into the rows area and the Duration field into the Values area. Right-click any of the value results in the pivot table, and in the Value Field Settings dialog select Max. Then click on Number Format button and set the custom number format of hh:mm:ss. Confirm all dialogs.
If you want to format the date, right click any of the visible dates in the Pivot table, select Field Settings, click Number Format and then set the custom format ddd.
Drag the duration field into the values area again and set its calculation method to Average.
Drag the "long calls" field into the values area.
Hide the Grand Totals via the Pivot Table tools Design ribbon command.
Now you can add more data to the table in columns A to B, right click the pivot table and select refresh.

Excel 2016 Pivot Table Sorting Dates Alphabetically

This probably wouldn't count as a programming question, but I'm starting to think it might be a glitch with Microsoft Excel 2016.
My Pivot Table aren't sorting my dates chronologically.
When I toggle the 'Sort Oldest to Newest' in the pivot table, my dates seem to be sorted alphabetically.
Date Revenue
10-Aug $83,004
10-Nov $43,137
10-Oct $881,775
10-Sep $470,486
11-Aug $45,676
11-Nov $250,890
11-Oct $1,324,366
My source data is sorted chronologically no problem.
Source Data sorted nicely:
I have confirmed that my source dates are formatted as Date as well as the format in pivot table. However, I should note, that I can't seem to change the format of the dates on the pivot table. I've Tried the Following:
Opening the 'Value Field Settings Box' by right clicking on the 'Date' field in the Rows > Opening the Format Cells by clicking on 'Number Format' > Selecting Date (and changing the settings from 'd-month' }} This doesn't change the formatting
Highlighting the date column and changing the format to short date in the Number Section of the Home Ribbon }} this also doesn't change the format of the date
In order to confirm that my dates in my source information are formatted as dates, I used the 'Text to Columns' function to be sure that all the dates were pasted as mdy dates. I've also selected the column of dates and right clicked to access format cells as dates. Lastly, I ensured that they registered as dates according to the Number column in the home ribbon.
I thought this was a simple problem, I want my dates in my pivot table to sort chronologically, but it seems to be impossible.
Here is a link to the file for reference.

Resources