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

Fabien Carrion fabien.carrion at gmail.com
Sun Jun 10 23:03:57 EDT 2007


On 6/10/07, Julian Hyde <julianhyde at speakeasy.net> wrote:
> 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, ";

with the MDX :  "select NON EMPTY {" + dimensions[n].getUniqueName() +
".Members} ON columns, " I get all the measures. But I don't get the
CalculatedMember. Is it the normal behaviour?

Thanks

-- 
Fabien Carrion

()  Campagne du ruban ASCII -- Contre les mails en html
/\  contre les pieces-jointes Microsoft
Web: http://fabien.carrion.free.fr/



More information about the Mondrian mailing list