olap4j - QueryAxis sort

21 views
Skip to first unread message

Luc Boudreau

unread,
Aug 4, 2009, 1:42:13 PM8/4/09
to wabit-de...@googlegroups.com, olap4j...@lists.sourceforge.net
Hi,

FYI. Today i checked in a new functionality for the QueryModel. It is now possible to sort axis positions according to measures or any other arbitrary numeric computation. Here's an overview of how it works.

query.getAxis(Axis.ROWS).sort(SortOrder.BASC, "Measures", "Sales");

This would sort the rows axis positions by Sales value and would break hierarchical nesting (BASC operator).

query.getAxis(Axis.ROWS).sort(SortOrder.DESC);

This last one would sort the rows axis positions in descending order based on the default measure value while maintaining hierarchical nesting.
 
All this neat stuff is available on the SNAPSHOT builds of the 0.9.8 line.

Cheers!
_____________________________
Luc Boudreau
Reply all
Reply to author
Forward
0 new messages