Ranking using Excel Pivot Tables
Excel 2003, Microsoft, Tips June 21st, 2008Ranking with Pivot Tables is a hidden feature and is a extremely helpful when performing ad hoc analysis, this tutorial goes through a step by step guide on how to rank with Pivot Tables.
Choosing what to Rank
Ranking can be performed on these areas for a Pivot Table:
- Page Area
- Row Area
- Column Area
The example below goes through a Row Area field.
Locating the Rank Options
With Excel Pivot Tables ranking is known as AutoShow and sorting is known as AutoSort, in this tutorial I will just stick to calling them ranking and sorting.
To get to the options is fairly simple. First you need to open up the PivotTable field options for the field you want to rank, this can be done two different ways:
Either way will get you to the PivotTable field dialog box (note the field name in the Name: area)
To get to the rank and sort options click on the Advanced button.
An Example
In this example I have the Revenue and Loss of a Continent and the Countries in those continents. I want to rank the:
- The top 2 Countries
- By Revenue
- In Descending Order
Here is the data set we will be working with:
After creating the Pivot Table the data now looks like this.
Navigate to the PivotTable field Advanced Options and I have set up the options as seen below.
After setting the options (seen above) and clicking the OK button twice the Pivot Table now looks like this.
There you go, this is how to show the top 2 countries by revenue in descending order.
You should also take note that the field we have set up the ranking and sorting on is not highlighted blue.
If I wanted to show the bottom 2 countries by revenue in ascending order, the PivotTable field Advanced Options would look like this:
Click here to download this example as an Excel Workbook
I have gone over only applying the ranking and sorting to a Row Area, you can apply this method to the Page Areas and Column Areas as well - if you would like to see this tutorial expanded on this please let me know.
You can also cascade your ranking and sorting, for example you can have multiple Row, Column or Page Area fields with ranking applied (see the example workbook).
If you have any questions or suggestions please comment.
Enjoy!









June 24th, 2008 at 11:29 am
[...] Original post by Prashant Raju [...]
June 26th, 2008 at 12:23 am
[...] on how you can rank your data using Pivot Tables it has a step by step guide and great screen shots!http://www.jumbabox.com/2008/06/ranking-using-excel-pivot-tables/LD50 for various snakes. - Translate this page All data in the table that follows must be viewed [...]
June 27th, 2008 at 5:13 am
[...] [...]