Pivot Table Filter - Sorting

AnnWillmott

New Member
Joined
Nov 17, 2008
Messages
9
Hi, I have a pivot table that has a report filter field. (Excel 2007.) I am trying to figure out how to sort the filter's drop-down list. Field settings does not provide any sort options. PivotTable Options provides a sort specification for the entire table, but this doesn't seem to affect the filter.

The issue is that the filter is a number, and the numbers are out of order: 2203, 2204, 2213, 2205. In an attempt to troubleshoot this problem, I made sure the source data was all formatted as a number, not as text, but that didn't help.

The source data is also sorted by this number and 2213 appears in its proper place. So I can't figure out what is making Excel put the filter list in that order, and how to fix it. Anyone run across this and have words of wisdom? Any help will be greatly appreciated! --Ann
 
Hi, I have a pivot table that has a report filter field. (Excel 2007.) I am trying to figure out how to sort the filter's drop-down list. Field settings does not provide any sort options. PivotTable Options provides a sort specification for the entire table, but this doesn't seem to affect the filter.

The issue is that the filter is a number, and the numbers are out of order: 2203, 2204, 2213, 2205. In an attempt to troubleshoot this problem, I made sure the source data was all formatted as a number, not as text, but that didn't help.

The source data is also sorted by this number and 2213 appears in its proper place. So I can't figure out what is making Excel put the filter list in that order, and how to fix it. Anyone run across this and have words of wisdom? Any help will be greatly appreciated! --Ann
The suggestion to move the filter field to a row and then back to the filter works, although I found it limiting especially as I was trying to generate pivot table reports with a python script using openpyxl. One additional feature I added to the suggestion was to add an additional pivot table to the report (on a page that can remain hidden if desired) where the rows are the filter field. You may have to refresh your pivot tables, but in doing this step, since the data is shared across the pivot table it automatically orders the values in the filter fields the same way it does in the other table. Now if you are automatically adding new data to your workbook, simply by refreshing your hidden table will order the data, and the filter will be ordered as well.
 
Upvote 0

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,215,368
Messages
6,124,523
Members
449,169
Latest member
mm424

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top