You can set up sorting based on a particular measure - just right-click the field you want to sort and choose by which measure you want to sort.
Without setup it is hard to get to specifics. Can you show what you've set up so it is easier to troubleshoot?
Did Dana's response give you what you need?
You can also create a calculated field for the sole purpose of sorting by using the INDEX() function to create a dimension that will rank your table records by whatever criteria you want. Then, you just have to add this field as the first pill on your rows (or columns) shelf. If you don't want it displayed, you can uncheck "Show Header."
As Dana said, if you need more help, it'd be easiest if you shared a packaged workbook.