[Mondrian] How to explore the dimension object used as a measure?

Julian Hyde julianhyde at speakeasy.net
Sun Jun 10 11:44:59 EDT 2007


You're only getting the first measure because you're calling  

>   Member member = hierarchy.getDefaultMember();

To get all members of the measures dimension you could write

>   if (dimensions[n].isMeasures()) {
>     Hierarchy hierarchy = dimensions[n].getHierarchy();
>     SchemaReader schemaReader = schema.getSchemaReader();
>     Member[] members =
schemaReader.getHierarchyRootMembers(hierarchy);

Or, just generate MDX:

>   if (dimensions[n].isMeasures()) {
>     columnsMdx = " select NON EMPTY {" + dimensions[n].getUniqueName()
+ ".Members}
> ON columns, ";

Julian




More information about the Mondrian mailing list