+ Reply to Thread
Results 1 to 7 of 7

Pivot Table order problem

Hybrid View

  1. #1
    Registered User
    Join Date
    04-18-2008
    Location
    Ipswich, England
    MS-Off Ver
    Office 2007, 2003, 2000, XP
    Posts
    17

    Pivot Table order problem

    I have a large database (185,000 lines) of the UK pop charts, week by week. It has Date, Artist, Title, Chart Position, plus various other fields. The database is in a strict order by date (old-new) and then by Position (1-100). It is currently in an Access Database and I am using the external data functions in Excel

    I am trying to create a pivot table that shows the first Date that an Artist entered the chart. Fairly straightforward. I also want the the results in Date order. Again easy to do. - Row Label - Artist Value - Min of Date. Then sorted a-z on the value field.

    What I do not understand is the order Excel insists on putting them. It is not alphabetical and it is not in the same order as the database. But it is always in the same order, which for some reason is record numbers 2 then 8 then 6, 1, 4, 10, 7, 15, etc.

    This order is the same if I link directly to the database and pull out the raw data or go directly from Access to a Pivot Table. It also uses the same order if I use just a small part of the data copied and pasted into a new spreadsheet (ie not associated to the external database).

    I would prefer the final table to be in the same order as the database. Anyone got any ideas why this happens and any ideas on how to get around it?

    Steve

  2. #2
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852
    Quote Originally Posted by UKSteveH

    I am trying to create a pivot table that shows the first Date that an Artist entered the chart. Fairly straightforward. I also want the the results in Date order. Again easy to do. - Row Label - Artist Value - Min of Date. Then sorted a-z on the value field.
    Steve
    You can use the "sort option" in the pivot table features.

    You can sort alphabetically in the row field by selecting the "artist" field and in field configuration: "ascending".
    If you found the solution to your question. Mark the thread as "Solved"
    Thank everyone that helped you with a valid solution by clicking on their

    There is no such thing as a problem, only a temporary lack of a solution

  3. #3
    Registered User
    Join Date
    04-18-2008
    Location
    Ipswich, England
    MS-Off Ver
    Office 2007, 2003, 2000, XP
    Posts
    17
    Sorry that does not work for me!

    The final sort order should be in the same order as the database. In this case Al Martino is the first record in the database and should be the first in the pivot table.

    The problem lies in the fact that the Date is the same for several entries, I don't want alphabetical Artists. The order is actually by Date then Position, but Position is not in the pivot table (if it was I would get duplicate artists)

    As I see it, there is no logical reason why the first 15 records of the pivot table are not in the same order as the database.

    The only way I can see around this would be to add xxx seconds or minutes to the Date where xxx is the same value as the chart position. This would mean that the the sort would work. But this seems a rather long winded method to get the data back to the way it originally appeared!

    I have attached a sample of the data (first 100 lines) and a pivot table is on Sheet4. Try and get the results in a different order.

    Steve
    Attached Files Attached Files

  4. #4
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852
    You cant sort by position, if position is not in the pivot table.

    Try this and see if it suits you.

    (sorted by min of position)

    (attached)
    Attached Images Attached Images

  5. #5
    Registered User
    Join Date
    04-18-2008
    Location
    Ipswich, England
    MS-Off Ver
    Office 2007, 2003, 2000, XP
    Posts
    17
    Thanks. I have already tried that.

    If only I could understand how Excel determines the order that it displays them...

    Obviously one of those Microsoft Moments! unless someone has a better idea...

  6. #6
    Forum Contributor ptm0412's Avatar
    Join Date
    04-16-2008
    Location
    Vietnam
    MS-Off Ver
    Office 2003 and 2007
    Posts
    129
    I wonder if you are using Excel 2003 or 2007?
    Your Pivot in sheet4 can not be sorted in 2003 but can be sorted in 2007. And I guess it is not an Excel Pivot, perhaps an Access Pivot.
    Anyway, I have made another one in the same sheet with data, by Excel 2003. It seems autosort after be made. Look the attachment.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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