[Mondrian] Issues with Calculated Members...

Matt Campbell mkambol at gmail.com
Tue Feb 19 10:28:12 EST 2008

Here's a query I just ran in Analysis Services.  If a member is defined on
dimension it has 0 children, and it's parent is *not* All.  It's level
ordinal is 0.

The other way to define a calculated member is to attach it to another
member.  The second set of members in my query has a calculated member
attached to "All Gender".  In that case it's parent *is* all and it's
ordinal is 1.  It still has 0 children, but now has 2 siblings.

 member gender.calculated as 'gender.m'
member  gender.[All Gender].calculated as 'gender.m'
member measures.countChildren as 'gender.calculated.children.Count'
member measures.parentIsAll as 'gender.calculated.Parent IS gender.[All
member measures.levelOrdinal as 'gender.calculated.Level.Ordinal'

member measures.definedOnAllLevelOrdinal as 'gender.[all
member measures.definedOnAllLevelParentIsAll as 'gender.[all
gender].calculated.Parent IS gender.[All Gender]'
member measures.definedOnAllLevelChildren as 'gender.[all
member measures.definedOnAllLevelSiblings as 'gender.[all

select { measures.[countChildren],   -- returns 0
          measures.parentIsAll,   -- returns 0
     measures.levelOrdinal,  -- returns 0
  measures.definedOnAllLevelOrdinal,  -- returns 1
  measures.definedOnAllLevelParentIsAll,   -- returns 1
measures.definedOnAllLevelChildren,  -- returns 0
 measures.definedOnAllLevelSiblings   -- returns 2
 } on 0 from sales

On Feb 17, 2008 11:01 PM, John V. Sichi <jsichi at gmail.com> wrote:

> Will Gorman wrote:
> > A quick fix to this problem was to not set the all flag for calculated
> > members.  My question is should these calculated members be created at
> > the [(All)] level in the first place?  Also, should calculated members
> > have the all member if it exists as a parent?
> Seems like they should be children of the all member when it exists and
> when no other parent is specified (if specifying a parent were working).
> Maybe there's a way to test what MSAS does in that case?
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20080219/bc408783/attachment.html 

More information about the Mondrian mailing list