PDA

View Full Version : Ordering numeric hierarchy members



jonttu
11-20-2003, 04:20 AM
Hi,
Is it possible to order hierarchy members in numeric order instead of alphabetical order?
i.e. instead of having a hierarchy displayed as "1, 10, 100, 2, 20, 200..." it would be displayed "1,2,3,4,5,6,7..."
Thanks,
Joonas

jhyde
11-20-2003, 01:32 PM
By default, a hierarchy is sorted by the key column. What is the type of the key column in the underlying database? If it is numeric, you should get numeric sorting.

jonttu
11-24-2003, 11:59 PM
The key column type is integer. This problem is with jpivot 1.0.2 and I was told at the jpivot forum that there was a bug in Mondrian MDX hierarchize() function but it has been fixed in a later version. Is this correct?

javier_ldb
03-28-2005, 05:42 AM
yeah, but if i want to sort by another column?? How do i do this?

jhyde
03-29-2005, 05:09 AM
If you want to display one column as the name of a member (e.g. month name, 'September') and sort by another (e.g. month ordinal, 9) then use the 'ordinalColumn' attribute of <Level> to specify the sort column.
The "Position" dimension in FoodMart.xml is an example of this.