[Mondrian] Default measure not configurable in Schema.xml.

Julian Hyde julianhyde at speakeasy.net
Thu Apr 12 17:42:38 EDT 2007

Having a calculated member as default member is a great idea.
There is a problem that when you evaluate a calculated member, the
context is switched so that the current member becomes the default for
that dimension.
For example,
WITH MEMBER [Measures].[Foo] as ' [Measures].CurrentMember.Name '
SELECT {[Measures].[Foo] } ON COLUMNS
FROM [Sales]
will return "Unit Sales".
If you define a calculated member as the default member, and you forget
to switch the context, the expression will loop. For example, if you
[Measures].[Foo] as ' ([Time].[1997].[Q2], [Store].[CA] ) '
and make [Foo] the default measure, it is saying that [Foo] for any cell
is the value of [Foo] in California, 97Q2, which is a recursive defn.
It is not a terrible problem, but it is a pitfall end-users should know
about, and you should document in schema.html. You should test for it
and make sure that the error message is reasonable.


From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org]
On Behalf Of Shishir Das
Sent: Thursday, April 12, 2007 5:28 AM
To: mondrian at pentaho.org
Subject: [Mondrian] Default measure not configurable in Schema.xml.


We need a functionality by which we can specify a calculated member as a
default measure. 
Currently, Mondrian considers the first measure defined in a cube as the
default measure, hence a calculated member cannot be default measure. 

Is there an existing way(which we overlooked) to achieve this? Please
let us know. 

We could think of a solution where: 

we have a property added to the cube element in Schema.xml to specify
the default measure so that all queries use that measure 
as default measure. It will be an optional property. If user does not
explicity specify it, the behaviour will be the same as it is now. Do
you foresee any issues if we add this property? 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20070412/e50e3635/attachment.html 

More information about the Mondrian mailing list