Tableau will always sort by the column on the left. You may conduct a secondary sorting more simply using the updated nested sorting. When you extend up and down hierarchies, as you are doing now, the formatting may not be preserved.
The "traditional" method is to construct a Rank based on the quantity of orders (sounds like you were close on this one). COUNT([Order ID]),'desc'), rank(COUNT([Order ID]),'desc'). Make this a distinct measurement and place it to the left of the others.
To clean it up, you can uncheck "Show Header" on the rank pill.
And if you expand/collapse the hierarchy, it keeps the sorting... Final product:
EDIT: Here is another way to try to accomplish this. It seems to work for 3 levels but starts to break down after that. (It also didn't seem to work well on grouped dimensions.)
- Expand the hierarchy to all three levels.
- On each dimension, enforce a sort order of Count of Order ID Descending.
Master data visualization with our Tableau Training and unlock powerful insights from your data.