This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
For sorting that requires anything other than a simple ordering, I would generate a "SortOrder" variable, and calculate it based on whatever rules I had in mind; then just order based on that variable. It appears that you've got a pretty wild ordering in mind; if you can explain the rules you used to come up with that order, we might be able to assist with expressions to calculate it.