[Mondrian] ValidMeasure() combined with Aggregate()

Julian Hyde jhyde at pentaho.org
Wed Nov 14 13:47:51 EST 2007

Makes sense.
My instinct is that this behavior should be fairly straightforward to add -
I think that this was the default behavior, by accident, when I first
implemented virtual cubes.
I don't understand why it is necessary to eliminate duplicate 'all' members.
Can you explain in more detail why this is necessary?
As to where to put this property. A measure group in SSAS2005 is basically
the same as a usage of a cube in a virtual cube in mondrian. We don't have
an explicit element describing a usage of a cube by a virtual cube; note
that 'cubeName="Sales"' occurs several times in the following:
<VirtualCube name="Warehouse and Sales" defaultMeasure="Store Sales">
  <VirtualCubeDimension cubeName="Sales" name="Customers"/>
  <VirtualCubeDimension cubeName="Sales" name="Education Level"/>
  <VirtualCubeDimension cubeName="Sales" name="Gender"/>
  <VirtualCubeDimension cubeName="Sales" name="Marital Status"/>
  <VirtualCubeDimension name="Product"/>
  <VirtualCubeDimension cubeName="Sales" name="Promotion Media"/>
  <VirtualCubeDimension cubeName="Sales" name="Promotions"/>
  <VirtualCubeDimension name="Store"/>
  <VirtualCubeDimension name="Time"/>
  <VirtualCubeDimension cubeName="Sales" name="Yearly Income"/>
  <VirtualCubeDimension cubeName="Warehouse" name="Warehouse"/>
  <VirtualCubeMeasure cubeName="Sales" name="[Measures].[Sales Count]"/>
  <VirtualCubeMeasure cubeName="Sales" name="[Measures].[Store Cost]"/>
  <VirtualCubeMeasure cubeName="Sales" name="[Measures].[Store Sales]"/>
  <VirtualCubeMeasure cubeName="Sales" name="[Measures].[Unit Sales]"/>
  <VirtualCubeMeasure cubeName="Sales" name="[Measures].[Profit]"/>
  <VirtualCubeMeasure cubeName="Sales" name="[Measures].[Profit Growth]"/>
  <VirtualCubeMeasure cubeName="Warehouse" name="[Measures].[Store
  <VirtualCubeMeasure cubeName="Warehouse" name="[Measures].[Supply Time]"/>
  <VirtualCubeMeasure cubeName="Warehouse" name="[Measures].[Units
  <VirtualCubeMeasure cubeName="Warehouse" name="[Measures].[Units
  <VirtualCubeMeasure cubeName="Warehouse" name="[Measures].[Warehouse
  <VirtualCubeMeasure cubeName="Warehouse" name="[Measures].[Warehouse
  <VirtualCubeMeasure cubeName="Warehouse" name="[Measures].[Warehouse
  <VirtualCubeMeasure cubeName="Warehouse" name="[Measures].[Average
Warehouse Sale]"/>
  <CalculatedMember name="Profit Per Unit Shipped" dimension="Measures">
    <Formula>[Measures].[Profit] / [Measures].[Units Shipped]</Formula>

Would it make more sense to add it as a property of VirtualCubeMeasure, or
to add a new element VirtualCubeCubeUsage? Or the simplest thing would be to
add it to the VirtualCube itself.


From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On
Behalf Of Ajit Vasudeo Joglekar
Sent: Wednesday, November 14, 2007 12:30 AM
To: Mondrian developer mailing list
Subject: Re: [Mondrian] ValidMeasure() combined with Aggregate()

We are exploring how we can do something like SSAS2005
IgnoreUnrelatedDimensions in mondrian. 

General approach we are trying out is to pull the unrelated dimensions to
all/default member and eliminate any duplicates formed due to pulling up to
all level inside the aggregate function evaluation method. E.g. in
AggregateFunDef evaluateDouble method inside the anonymous
AbstractDoubleCalc. Eventually same thing will have to be done in all other
agg functions 

The decision whether to apply this logic can be driven by a property
"IgnoreUnrelatedDimensions" defined at base cube level since MeasureGroups
are not yet there in mondrian 

The approach looks promising till now. We will soon post prototype code. In
the mean while requesting ideas, comments. Are we missing anything important


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

More information about the Mondrian mailing list