Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: strange sideeffect (bug?) on calculation if hasAll is false

  1. #1
    Join Date
    Sep 2013

    Default strange sideeffect (bug?) on calculation if hasAll is false

    in the foodmart example DB/schema, if I disable the "hasall" of the gender dimension, it impacts the result of any calculation, even if the dimension gender is not selected at all. See the following example queries, the first one before, the second one after modifying the schema (note, the (All) in the ROW selector is taken from the customer dim., see mdx below).



    The corresponding mdx is:
    NON EMPTY {[Measures].[Unit Sales]} ON COLUMNS,
    NON EMPTY {Hierarchize({[Customers].[All Customers]})} ON ROWS
    FROM [Sales]
    ... so there is really no reason why gender would impact this query!

    here is the modified FoodMart.xml, at around line 295 :

    <Dimension visible="true" foreignKey="customer_id" highCardinality="false" name="Gender">
          <Hierarchy visible="true" hasAll="false" allMemberName="All Gender" primaryKey="customer_id">

    Looks to me like a bug, yet I am quite new to mdx and mondrian and therefore I am wondering if I am maybe missing something fundamental.

  2. #2
    Join Date
    Jan 2013


    There is something fundamental going on, and it's not necessarily intuitive.

    Each cell in a cube can be thought of as the intersection of one member from each of its hierarchies. If you don't explicitly include a hierarchy in an MDX query, the "default member" is used during evaluation. Typically the default member is the [(All)] member, but that's not always the case. You can specify a different default member, or in some cases (like yours) there is no [(All)] member to use. In that case Mondrian would use the first member it finds as the default member.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2017 Pentaho Corporation. All Rights Reserved.