// * BDESC)
MdxSetOrdered<Member> orderedSetToRank = new Order(mdxSetToRank, sortMeasure, direction).getReturn();
orderedSetToRank = new Head(orderedSetToRank, topCount).getReturn();
if(orderedSetToRank.getName()==null)
orderedSetToRank.setName(new BracketName("[OrderedSet]"));
// * MEMBER [Measures].[Rank] AS
// RANK([Hierarchy].CurrentMember,
// [OrderedSet])
// {HEAD([OrderedSet], 10)} ON 1
MdxValueExpression rankingMeasure =
new Rank(
orderedSetToRank.getMembersHierarchy().getCurrentMember(),
// orderedSetToRank.getName())
orderedSetToRank)
.getReturn();
//rankName
//[Measures].[Ranking] !
// BracketName rankingName = Measures.getInstance().getMemberExpression("Ranking").getDefinition();
BracketName rankingName = mdxQuery.getMeasure().getMemberExpression("Ranking").getDefinition();
//SELECT
// {[Measures].[Ranking], [Measures].[MeasureSum]} ON 0,
mdxQuery.addSelection(orderedSetToRank, axis);
Member rankingMember= new Member(orderedSetToRank.getMembersHierarchy(),rankingMeasure);