Spreadsheet: 138519d1327692436-pivot-sort-by-two-columns-prova
Sheet: Result

DEPTID | POSITION | VENDOR_NAME | YTD Expense | AKA "Grand Total" |  |  |  |  |  |  | Sum of Grand Total
[PHONE] | 00032688 | Colon,[NAME] | 100.8 |  |  |  |  |  |  |  | DEPTID | POSITION | VENDOR_NAME | Total
 | 00065009 | [NAME],[NAME] | 296.02 |  | The green is how I want it. |  |  |  |  |  | [PHONE] | 00032688 | Colon,[NAME] | 100.8
 | 00062200 | [NAME],[NAME] | 573.2 |  | Note we're sorted by YTD Expense, within DEPTID |  |  |  |  |  |  | 00065009 | [NAME],[NAME] | 296.02
 | 00031512 | Adams,[NAME] | 587.35 |  |  |  |  |  |  |  |  | 00062200 | [NAME],[NAME] | 573.2
 | 00031506 | Wilson,[NAME] | 611.25 |  |  |  |  |  |  |  |  | 00031512 | Adams,[NAME] | 587.35
 | 00031507 | Forbes,August S. | 909.4 |  |  |  |  |  |  |  |  | 00031506 | Wilson,[NAME] | 611.25
 | 00062790 | Mcmahon,[NAME] | 1085.88 |  |  |  |  |  |  |  |  | 00031507 | Forbes,August S. | 909.4
 | 00062818 | Riley,[NAME] | 1586.01 |  |  |  |  |  |  |  |  | 00062790 | Mcmahon,[NAME] | 1085.88
[PHONE] Total |  |  | 5749.91 |  |  |  |  |  |  |  |  | 00062818 | Riley,[NAME] | 1586.01
[PHONE] | 00058845 | Espinoza,[NAME] | 127.3 |  |  |  |  |  |  |  | [PHONE] Sum |  |  | 5749.91
 | 00063077 | Salas,[NAME] | 186.15 |  |  |  |  |  |  |  | [PHONE] | 00058845 | Espinoza,[NAME] | 127.3
 | 00058851 | Allen,Elijah A. | 670.45 |  |  |  |  |  |  |  |  | 00063077 | Salas,[NAME] | 186.15
 | 00058849 | Nicholson,[NAME] | 685 |  |  |  |  |  |  |  |  | 00058851 | Allen,Elijah A. | 670.45
 | 00065544 | [NAME],[NAME] | 858.6 |  |  |  |  |  |  |  |  | 00058849 | Nicholson,[NAME] | 685
 | 00058850 | Beard,[NAME] | 1338.62 |  |  |  |  |  |  |  |  | 00065544 | [NAME],[NAME] | 858.6
 | 00064068 | Vance,[NAME] | 1393.82 |  |  |  |  |  |  |  |  | 00058850 | Beard,[NAME] | 1338.62
[PHONE] Total |  |  | 5259.94 |  |  |  |  |  |  |  |  | 00064068 | Vance,[NAME] | 1393.82
[PHONE] | 00058872 | Mercer,[NAME] | 210.75 |  |  |  |  |  |  |  | [PHONE] Sum |  |  | 5259.94
 | 00066126 | Price,[NAME] | 257.95 |  |  |  |  |  |  |  | [PHONE] | 00058872 | Mercer,[NAME] | 210.75
 | 00058876 | Wagner,[NAME] | 998.4 |  |  |  |  |  |  |  |  | 00066126 | Price,[NAME] | 257.95
 | 00058879 | [NAME],[NAME] | 1066.95 |  |  |  |  |  |  |  |  | 00058876 | Wagner,[NAME] | 998.4
 | 00064052 | [NAME],[NAME] | 1546.51 |  |  |  |  |  |  |  |  | 00058879 | [NAME],[NAME] | 1066.95
[PHONE] Total |  |  | 4080.56 |  |  |  |  |  |  |  |  | 00064052 | [NAME],[NAME] | 1546.51
[PHONE] | 00031576 | Lyons,Coleman O. | 394.2 |  |  |  |  |  |  |  | [PHONE] Sum |  |  | 4080.56
 | 00031580 | Clements,[NAME] | 89.95 |  | This is how I don't want it |  |  |  |  |  | [PHONE] | 00031580 | Clements,[NAME] | 89.95
 | 00031581 | [NAME],[NAME] | 862.75 |  | Note we're sorted by DeptID, then by Position |  |  |  |  |  |  | 00036828 | [NAME],[NAME] | 107.7
 | 00036828 | [NAME],[NAME] | 107.7 |  |  |  |  |  |  |  |  | 00065880 | [NAME],[NAME] | 154.95
 | 00063075 | Mcguire,[NAME] | 805 |  |  |  |  |  |  |  |  | 00031576 | Lyons,Coleman O. | 394.2
 | 00065880 | [NAME],[NAME] | 154.95 |  |  |  |  |  |  |  |  | 00063075 | Mcguire,[NAME] | 805
[PHONE] Total |  |  | 2414.55 |  |  |  |  |  |  |  |  | 00031581 | [NAME],[NAME] | 862.75
 |  |  |  |  |  |  |  |  |  |  | [PHONE] Sum |  |  | 2414.55
 |  |  |  |  |  |  |  |  |  |  | Grand Total |  |  | 17504.96