Here's what's happening to you. In your "Old Sorting" sheet, you only had MeasureNames and MeasureValues in play. Essentially one dimension. Now you have many, and the marks are dictated by those dimensions.
I messed with your Sheet #2. Here is the step-by-step things I did.
I made a calc: [index]. When we're playing with table calcs, it really helps to understand what Tableau sees as the "next" cell. Index shows that. Then, when playing with the rank calcs, you can see what Tableau is doing with your data.
One of the problems with sorting by RANK is that when there is no data, Tableau calculates NULL, and pushes all the NULLs to the front. All of the individual marks (each separate color box) gets an evaluation for the RANK table calc, and only the yellow ones get a rank value. All the greens and blues don't. They get NULL and get shoved to the front.
So I made [Calculation1] that uses a different table setting (restart every [CC Name]) and it assigns the [Eligible Rank] value to all marks within each [CCF Name]. Now, no matter what Status Type a mark is, it gets a usable [Eligible Rank] value, and then [CC Name] "chunks" all act together.
You can do the same with the other ranks.
Trials_sorting_rank A.twbx 360.2 KB
Beautiful, thank you!
You're right - works great with other ranks as well.
I thought a Window function might help but wasn't sure how - good to know.
Appreciate the fast response!