[Mondrian] mdx sorting question..

Ati Rosselet ati.rosselet at gmail.com
Sat Jun 23 07:25:34 EDT 2012

Is there any way to get the values in the resulting axis sorted in the same
order as in the mdx query?
I can arrange the display elements as I wish, and they stay as in the
query, but when I open a node and the query contains [x].Children, then all
items on all levels
get sorted by their ordinal column/alphabetically.  for example

select {[Time].[2012]} ON COLUMNS,
  {[Account].[Primary cost], [Account].[BU Overhead],
[Account].[Infrastructure Cost Allocation]} ON ROWS
from [FI]

when expanding on [BU Overhead] returns an axis with the following Tuples:
"[[[Account].[Primary cost]], [[Account].[BU Overhead]],
[[Account].[Infrastructure Cost Allocation]], [[Account].[BU Overhead].[BU

which gets changed by Hierarchize into:
"[[Account].[BU Overhead].[BU Overhead], [Account].[BU Overhead],
[Account].[Infrastructure Cost Allocation], [Account].[Primary cost]]"

which then loses the original ordering when the results are returned.

What I'd be looking for is some way to get it to return
"[[[Account].[Primary cost]],[[Account].[BU Overhead]], [[Account].[BU
Overhead].[BU Overhead]]], [[Account].[Infrastructure Cost Allocation]] "
or something like that - the point being that the original ordering is
retained.  Is there any such mechanism... maybe I need to change something
in the mdx query?
The current query generated is :

select {[Time].[2012]} ON COLUMNS,
  Hierarchize(Union({[Account].[Primary cost], [Account].[BU Overhead],
[Account].[Infrastructure Cost Allocation]}, [Account].[BU
Overhead].Children)) ON ROWS
from [FI]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20120623/3c2ef470/attachment.html 

More information about the Mondrian mailing list