[Mondrian] bug in mdx function ORDER() ?

Paul Stoellberger paul.stoellberger at aschauer-edv.at
Tue Oct 5 20:44:44 EDT 2010


Hello,

i'm trying to get my head around the Order() functionality in the olap4j query model... but something seems wrong which could be caused by mondrian.
When I execute this MDX:

select NON EMPTY {[Measures].[Quantity]} ON COLUMNS,
  NON EMPTY Crossjoin({[Product].[All Products]}, Order( {[Order Status].[All Status Types],[Order Status].[All Status Types].Children}, [Order Status].CurrentMember.Name, DESC))
 ON ROWS
from [SteelWheelsSales]

The order status is order by name correctly!

But when I remove the [Order Status].[All Status Types] from the set thats being ordered.... the result is wrong... its just like as if the Order() has no effect at all:

select NON EMPTY {[Measures].[Quantity]} ON COLUMNS,
  NON EMPTY Crossjoin({[Product].[All Products]}, Order( {[Order Status].[All Status Types].Children}, [Order Status].CurrentMember.Name, DESC))
 ON ROWS
from [SteelWheelsSales]

I looked at the SQL but there was no sign of ORDER BY status DESC ... that means mondrian must resolve that internally.

Am I misunderstanding something here or is this a bug in mondrian?

- Paul


More information about the Mondrian mailing list