Friday, March 27, 2015
Text Size

Excel PivotTable Filter List Ordering

So I googled this for a while and there are a lot of solutions out there, none of which applied to what we meant and lots of people in the same boat.

The Situation
We have an Excel report which summarizes for our guys at the top, all the activities and time spent by staff. There are several filters available on the report (only a few to keep it simple silly). When you click on the filter, a dropdown appears with all available values listed.

The Problem
The values are listed in alphabetical order at first. If any new values come along then they get added to the bottom of the list... This is the problem. For example, if the year dropdown has a list of 2010, 2011, 2013; then if you add an entry which has year 2012, then the dropdown list will be in the following order: 2010, 2011, 2013, 2012.

The Solution
  1. Bring up the field list of the report (so you see the fields panel)
  2. Untick the filter that is not in alphabetical order
  3. Click on the Refresh button
  4. Re-Tick the filter to add it back to the report
  5. Move this added field to the Report Filter section (click on it and select "Move to Report Filter")
Excel: Ordering my pivottable dropdown filter list

Advanced Sorting
So the above works which is great but what if you have a list of month names? January comes before February but not alphabetically, so let's do this as an example:
  1. Move the field from "Report Filter" to "Row Labels" (put it at the top as parent)
  2. Right-click on the pivotTable on one of the values of the row label you just moved
  3. Select "Sort"
  4. Select "More Sort Options"
  5. Select "Ascending or Descending" and select "Month" (or name of field) from the dropdown. (NOTE the "More Options" button)
  6. Click on OK to sort the values
      Office 2010:
    1. If items did not sort, then remove the column from the PivotTable altogether,
    2. hit the Data Refresh button
    3. Add the column back to the "Row Labels"
  7. Move the field back into "Report Filter"
  8. Done! The filter dropdown should retain the order.

  1. Similar to the above, open a Microsoft product
  2. Bang "Head" against wall.
  3. Bang "Head" against wall.
  4. Bang "Head" against wall.
  1. Change the SQL query so that the date returns in yyyy-mm-dd format (eg. 2012-03-04)

Reverse Dates Order
If you have a date filter list and want it sorted in descending order, I would recommend you return it in SQL date format (yyyy-mm-dd) and then do "Sort Z to A". You may find that the field needs to be unlinked and relinked each time further dates get added which is why you should leave it in ascending order if you don't want this overhead.


Web D
# Web Fri, 16th September 2011
Thanks for the FANTASTIC post! This information is really good.
Like | Dislike | +3 Reply | Reply with quote | Quote
Jeff B
# Jeff Thu, 23rd October 2014
Nice, thank you!
Like | Dislike | 0 Reply | Reply with quote | Quote
# Gim Wed, 14th January 2015
Thanks! Easy and effective. :D
Like | Dislike | 0 Reply | Reply with quote | Quote
Add Comment





Help Develop!

Thank You! :c)

Connect: Google+

Visitors of the World

Latest Posts

  • Basic Android App using Google Maps and Current Location

    • Wed 25-Mar-15
      Hi Rishikesh, I use a database on a webserver with all the latitudes and longitudes of the points of ...
      Joel L.  
    • Tue 24-Mar-15
      At the starting asa I run the app. I want to show list of garages available near by my current location.
    • Mon 23-Mar-15
      Ok!! The problem is in version of the app and SDK. Thank you, resolved :lol: .
    • Sat 21-Mar-15
      It occurs with Eclipse. Close Eclipse and again open your project freshly and you will see your code ...
  • JComments 2.3.0 with ReCaptcha in Joomla 2.5.x

    • Mon 23-Mar-15
      Worked like a charm first time! :lol: Getting bored of the spam comments. This should stop them. :P