M
Matt D Francis
Hello
A Pivot table I have is referencing column of data that contains individual
dates, the cells formatted yyyy-mm-dd.
I need the Pivot to group the data by Year and Month with second row grouped
underneath only so it appears as follows (YMONTH and SPECIALTY are bothrow
headers)
YMONTH SPECIALTY
2004 September ENT
General Surgery
Gynaecology
Oral Surgery
Paediatrics
Trauma & Orthopaedics
Urology
2004 September Total
2004 October ENT
General Medicine
General Surgery
Gynaecology
Ophthalmology
Oral Surgery
Paediatrics
Trauma & Orthopaedics
Urology
2004 October Total
2004 November ENT
General Medicine
General Surgery
Oral Surgery
Paediatrics
Trauma & Orthopaedics
Urology
I have done this by creating a second date column (YMONTH) in the source
data using the formula =text(date_field,"YYYY Mmm") which I've used in the
pivot. This works but because it is a text field the Pivot is sorting the
YMONTH field incorrectly (A-Z)
2004 Apr
2004 Jul
2004 Jun
2004 May
So I've then had to arrange them in the table manually. Any ideas how I
could avoid doing this?
A Pivot table I have is referencing column of data that contains individual
dates, the cells formatted yyyy-mm-dd.
I need the Pivot to group the data by Year and Month with second row grouped
underneath only so it appears as follows (YMONTH and SPECIALTY are bothrow
headers)
YMONTH SPECIALTY
2004 September ENT
General Surgery
Gynaecology
Oral Surgery
Paediatrics
Trauma & Orthopaedics
Urology
2004 September Total
2004 October ENT
General Medicine
General Surgery
Gynaecology
Ophthalmology
Oral Surgery
Paediatrics
Trauma & Orthopaedics
Urology
2004 October Total
2004 November ENT
General Medicine
General Surgery
Oral Surgery
Paediatrics
Trauma & Orthopaedics
Urology
I have done this by creating a second date column (YMONTH) in the source
data using the formula =text(date_field,"YYYY Mmm") which I've used in the
pivot. This works but because it is a text field the Pivot is sorting the
YMONTH field incorrectly (A-Z)
2004 Apr
2004 Jul
2004 Jun
2004 May
So I've then had to arrange them in the table manually. Any ideas how I
could avoid doing this?