Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
vbastarter
 
Posts: n/a
Default urgent pls! sort date pivot report

Have a pivot report with dates. I like to data sort by date in ascending
order. so i did sort and top 10 - asending

but i keep getting dates in this order -
11/07/2005
12/07/2005
13/06/2005
13/07/2005

but i would like to get in this order

11/07/2005
12/07/2005
13/07/2005
13/06/2005
How can i achieve this ???
  #2   Report Post  
Posted to microsoft.public.excel.misc
vbastarter
 
Posts: n/a
Default urgent pls! sort date pivot report

Also, i have count and sum formulas in the report, does this effect sorting ?

"vbastarter" wrote:

Have a pivot report with dates. I like to data sort by date in ascending
order. so i did sort and top 10 - asending

but i keep getting dates in this order -
11/07/2005
12/07/2005
13/06/2005
13/07/2005

but i would like to get in this order

11/07/2005
12/07/2005
13/07/2005
13/06/2005
How can i achieve this ???

  #3   Report Post  
Posted to microsoft.public.excel.misc
Max
 
Posts: n/a
Default urgent pls! sort date pivot report

Try adding a new col, "Day" to the source table
with the formula: =DAY(A2), copied down
assuming "Date" col is col A

Then pivot it with "Day" above "Date" in the ROW area
(in step 3 of the wizard)

Set Subtotals for "Day" to None
For "Date", set it to Autosort Descending
(in the PT Field Advanced Options dialog)

This yields the desired order for the "Date" col in the PT:

11/07/2005
12/07/2005
13/07/2005
13/06/2005


(Hide away the "Day" col, if required)
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"vbastarter" wrote in message
...
Also, i have count and sum formulas in the report, does this effect

sorting ?

"vbastarter" wrote:

Have a pivot report with dates. I like to data sort by date in ascending
order. so i did sort and top 10 - asending

but i keep getting dates in this order -
11/07/2005
12/07/2005
13/06/2005
13/07/2005

but i would like to get in this order

11/07/2005
12/07/2005
13/07/2005
13/06/2005
How can i achieve this ???



  #4   Report Post  
Posted to microsoft.public.excel.misc
Andrew Taylor
 
Posts: n/a
Default urgent pls! sort date pivot report


vbastarter wrote:
Have a pivot report with dates. I like to data sort by date in ascending
order. so i did sort and top 10 - asending

but i keep getting dates in this order -
11/07/2005
12/07/2005
13/06/2005
13/07/2005


These are sorted lexicographcally, which suggests that the dates
must be in text format in the source data.

but i would like to get in this order

11/07/2005
12/07/2005
13/07/2005
13/06/2005


But this isn't ascending order - 13/06/2005 should come first.
I assume there's a typo in there somewhere (e.g. should be
13/06/2006 or 13/08/2005)

How can i achieve this ???


Either fix the source data so that you have genuine dates rather
than text, or add an extra column: you can convert a "text date"
to a real one by using the VALUE() function and formatting as
dd/mm/yyyy; then pivot on this column instead of the text dates.

  #5   Report Post  
Posted to microsoft.public.excel.misc
vbastarter
 
Posts: n/a
Default urgent pls! sort date pivot report

Hi Thanks for the suggestions. Basically, the date doesn't get sorted
ascending or descending. And the source date is actually in date format.

While date is in actually A Col, B column contains No of sales and Sale
amount for each date. Hence two date cells are merged in the report. Is it
possible that this is causing the problem ?

Also, i didn't create the Pivot report and i dont know much about them. So i
can't do much with the source data and recreate another report.
"Andrew Taylor" wrote:


vbastarter wrote:
Have a pivot report with dates. I like to data sort by date in ascending
order. so i did sort and top 10 - asending

but i keep getting dates in this order -
11/07/2005
12/07/2005
13/06/2005
13/07/2005


These are sorted lexicographcally, which suggests that the dates
must be in text format in the source data.

but i would like to get in this order

11/07/2005
12/07/2005
13/07/2005
13/06/2005


But this isn't ascending order - 13/06/2005 should come first.
I assume there's a typo in there somewhere (e.g. should be
13/06/2006 or 13/08/2005)

How can i achieve this ???


Either fix the source data so that you have genuine dates rather
than text, or add an extra column: you can convert a "text date"
to a real one by using the VALUE() function and formatting as
dd/mm/yyyy; then pivot on this column instead of the text dates.




  #6   Report Post  
Posted to microsoft.public.excel.misc
Max
 
Posts: n/a
Default urgent pls! sort date pivot report

FWLIW, here's a sample construct (steps described in my response to you in
the other branch) which delivers exactly (imo) what you stated you wanted in
your orig. post:
http://www.savefile.com/files/6699697
SortByDayAscending_ByMonthDescending_PivotTable
_vbastarter_misc.xls

--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro to sort data in worksheet by specific date joey Excel Discussion (Misc queries) 0 November 14th 05 07:59 PM
NETWORKDAYS - Multiple Date Selection Annabelle Excel Discussion (Misc queries) 3 October 4th 05 07:04 PM
Sort a Column of Dates in Pivot Table Linny Excel Worksheet Functions 2 September 23rd 05 01:24 AM
Sort by Date scottnoddin77 Excel Discussion (Misc queries) 2 August 26th 05 01:26 AM
pivot reports - limit report to last 20 dates Pivot Help Excel Worksheet Functions 1 March 1st 05 09:08 PM


All times are GMT +1. The time now is 11:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"