How to sort a pivot table by value
※ Download: Excel pivot table sort by values
The City column order has changed, and Chicago, which has the highest Chocolate Chip sales, is at the left. After you sort the Chocolate Chip row, left to right, the values in the Chocolate Chip row are sorted largest to smallest, from left to right. You can also specify the Sort Direction using the Top To Bottom and Left To Right buttons.
Sort Pivot Fields With a Macro The following macro will change the Sort setting to Ascending A-Z , for all row and column fields, in all pivot tables, on all worksheets, in the active workbook. For information about changing the locale setting, see the Windows Help system. It is not possible to sort an entire table by a value field if it would break the row field groupings.
Sort data in a PivotTable or PivotChart - This allows you to see, at a glance, the rows or columns containing the greatest or the smallest values.
Originally Posted by sandy666: Right, you can sort by Values in SPH In Desen001 i can sort by SPH S2L or L2S and it is in tab form so? It's a tabular pivot table that lets me sort by values and it isn't giving me any troubles. FYI, sorting the first row field will not work since it only sorts the items within that field. As there is only one item in your example, no sorting occurs. You must sort the next field in order to make the sort actually change anything. Note also that this only works because you have the same item in field 1 for all the rows. It is not possible to sort an entire table by a value field if it would break the row field groupings. Originally Posted by sandy666: even from the same source? Since the first of the 2 fields was static it let me sort. As there is only one item in your example, no sorting occurs. You must sort the next field in order to make the sort actually change anything. Note also that this only works because you have the same item in field 1 for all the rows. It is not possible to sort an entire table by a value field if it would break the row field groupings.
However, the pivot table will not recognize this column as date. When I sort A to Z this is what I get: I would like this to sort in numerical order 09580 on top, 31785 in its proper place. They get sorted next. By writing 800 there, you are telling your pivot table to be sorted in which the cells which contain the value less than 800 will not be seen. Products are still sorted by Orders as well, with greater values at the top. You have to highlight the row you want to filter by first.