Is there a way to sort a Pivot table field in a row, by more than one column.? If I go to PivotTable Tools->Options->Sort I can sort by one column only.
-
What version of Excel are you using?– XynarizMay 6, 2014 at 16:12
-
we'e using Excel 2007– LukaszMay 6, 2014 at 16:31
-
When you say "sort by more than one column", do you mean that you want the data grouped using two or more criteria? PivotTables are good at congregating data, not sorting it.– XynarizMay 6, 2014 at 16:49
-
I actually mean sorting. say I have a Order Category in row and 2 values: Probability (avg) and Order Total (sum) I want the categories sorted by Descending Probability, followed by Descending Order Total.– LukaszMay 6, 2014 at 17:28
-
In that case, wouldn't it be easier to use Data -> Sort than to use a PivotTable?– XynarizMay 6, 2014 at 19:15
1 Answer
I used calculated field in the Pivot Table to represent the order that I wanted. I created a formula for the calculated field that gave me the corret order value. In my case it was a turnament standings where points and goal diffrence decided the order. My formula was points * 100 + scored goals - conceded goals.
Then in the "Value Fields Settings" for that field I selected "Rank Langest to Smallest" as "Show Values As". The calculated field that I called "Rank" showed the values 1, 2, 3 ... and a corret rank of the teams in the turnament.
Finally I applied decending order to the "Rank" field where as it is ordered by the calculeted value but not the displayed one and the table was now in the order that I wanted.