View Full Version : Ordering numeric hierarchy members
11-20-2003, 03:20 AM
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..."
11-20-2003, 12: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.
11-24-2003, 10: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?
03-28-2005, 04:42 AM
yeah, but if i want to sort by another column?? How do i do this?
03-29-2005, 04: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.