Standard MDX does allow for nesting order statements in a simple way; TM1 MDX is a little more complex... by which I mean that TM1 MDX is much more basic and therefore has limitations.
I was certain that I had done something like this before using the generate statement to produce the groupings based on the first order; and then sorting each of those in the second part of the generate with another order... but I can't find that code or quite get it working right now; I might manage to work it out again later but have limited time to spend on it right now.
To get to your solution quickly you just need to think in basic arithmetic terms; for example make the second sort value be a decimal point on the end of the first and then sort it all in 1 go. So if you have rows where the values on the first row are 1 and 2 and the values on the second are 1 and 3 - you can order them as 1.2 and 1.3.
Something like this can be done by throwing a rule in to place to concatenate your 2 values or just do it in the MDX.
I also can't seem to get CStr working right now which is driving me mad but again going even more basic on arithmetic try something like:
Code: Select all
{ORDER(
{TM1FILTERBYLEVEL( {[Territory].members}, 0)},
[Cube].([Category].["&$E$15&"], [Periods].["&$G$1&"], [Measure].[Tier]) +
( [Cube].([Category].["&$E$15&"], [Periods].["&$G$1&"], [Measure].[Amount]) / 1000000000000000 ) ,
BDESC
)}
Not the most elegant but functional.