• The only other way I think you could possibly get close (haven't tried it though), is by using a combination of rank() and filter() maybe. You'd also probably have to build the MDX dynamically.

    Not sure how close you're going to get though...MDX isn't really geared for that sort of thing natively.