Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Mondrian group by problem

  1. #1

    Default Mondrian group by problem


    I have an 'Error Hierarchy' having three levels. the data in table is something like this:

    Id, Category, Event, Reason
    001, ErrorLevel1, Crashed, ServerError
    002, ErrorLevel1, Crashed, ApplicationError
    003, ErrorLevel1, Survived, UserError
    004, ErrorLevel2, Crashed, ServerError
    005, ErrorLevel2, Crashed, ApplicationError
    006, ErrorLevel2, Survived, UserError

    The issues arises when I try to drill down to the last level to see the count(*) transactions associated with it. It is b/c Mondrian generates query like

    Select distinct count(transid)
    From ....
    Group By Reason

    which is not correct b/c it shows the same total by reason across all categories.

    The query should be:

    Select distinct count(transid)
    From ....
    Group By Category, Event, Reason

    Is there a way to solve this problem. I have tried selecting all the levels in Analysis view but it does not help.

    Below is my dimension definition:

    <Dimension type="StandardDimension" foreignKey="error_key" highCardinality="false" name="Error">
    <Hierarchy hasAll="true" allLevelName="Error" primaryKey="error_id">
    <Table name="user_errors">
    <Level name="Billing Category" column="billing_status" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never"></Level>
    <Level name="Billing Event" column="billing_event" type="String" uniqueMembers="false" levelType="Regular" hideMemberIf="Never"></Level>
    <Level name="Error Reason" column="error_code" type="String" uniqueMembers="false" levelType="Regular" hideMemberIf="Never"></Level>


    Thanks and regards, Charu

  2. #2
    Join Date
    Mar 2007


    It's hard to say, as the column names in your schema don't match those you show in the example table, but one thing I noticed right away is the use of uniqueMembers on the Billing Category level. This should be set to false. This looks like you can get it working by validating your schema and making sure everything maps correctly.

    Good luck!
    Luc Boudreau
    aka. Luc le Magnifique
    aka. Monsieur Oui Oui

    Lead Engineer, Pentaho Corporation
    Twitter: luclemagnifique
    IRC: Monsieur_Oui_Oui@freenode

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 - 2019 Hitachi Vantara Corporation. All Rights Reserved.