You should be able to sort the sum done in your pivot as long as you put a pipe between them so that the sum command can return results before you try to sort on its results.
Here's an example from something I'm working on that sounds similar to what you're trying to do - sort results descending on a sum column:
| pivot Sale Sale sum(Cost) AS "Sum of Cost" SPLITROW Publisher | sort -"Sum of Cost"
Through the Pivot builder GUI you can also select the sort dropdown under the x-axis header to sort some types of visualizations.
Let me know if this didn't answer your question.
... View more