[Mondrian] proposal for Order function with key specification list

John V. Sichi jsichi at gmail.com
Tue Sep 2 03:36:22 EDT 2008

Rushan Chen wrote:
> Mondrian implements the standard ORDER function as specified here:
> http://msdn.microsoft.com/en-us/library/ms145587.aspx
> It allows sorting of a set using one sort order based on a  value or 
> string expression for each cell.
> In our client, we would like to be able to sort a set using not just the 
> value_expression for a cell but also the level coordinates, similar to 
> the SQL order by clause. For MDX, it looks something like this:
> ORDER(<set> {, <key_specification>}...)
> <key_specification> ::= {<level>|<value_expression>} [, ASC | DESC | 
> <value_expression> ::= <numeric_value_expression> | 
> <string_value_expression>
> If <level> is specified, cells are compared using the ordinal column 
> value (if CompareSiblingsByOrderKey is set) for that level.
> I would like to know if this is something useful to everyone, and 
> whether for this it makes sense to extend Mondrian MDX beyond standard MDX.

Rushan, if you can supply an MDX query as a use case (one where multiple 
key components are needed, which is something else the standard Order 
function doesn't support), that would be helpful.


More information about the Mondrian mailing list