Uploaded image for project: 'Pentaho Analysis - Mondrian'
  1. Pentaho Analysis - Mondrian
  2. MONDRIAN-736

Wrong distinct-count aggregation for dimension with parentColumn

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Severity: Urgent
    • Resolution: Incomplete
    • Affects Version/s: 3.1.1 GA
    • Fix Version/s: Backlog
    • Labels:
      None
    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.

      Description

      At first, the actual Mondrian version is "3.1.1.12687-Jaspersoft", it's from JasperServer community edition, but I think here is a more appropriate place to file a bug report, as it seems to be completely Mondrian-specific.

      Well, I have a dimension:
      <Dimension name="Destination">
      <Hierarchy hasAll="true" allMemberName="All Destinations" primaryKey="id">
      <Table name="locationstree" schema="public" alias="destinations"/>
      <Level name="Location" column="id" nameColumn="name" ordinalColumn="name" type="Numeric"
      uniqueMembers="true" parentColumn="parentid" nullParentValue="0"/>
      </Hierarchy>
      </Dimension>

      And a measure:
      <Measure name="Day Count" column="timemonthly_id"
      datatype="Numeric" aggregator="distinct-count"/>

      And a query:
      select

      {[Measures].[Day Count]}

      ON COLUMNS,
      Hierarchize(Union(

      {[Destination].[All Destinations]}

      , [Destination].[All Destinations].Children)) ON ROWS
      from [Orders]

      And finally, it gives me a correct result for [All Destinations], but very high numbers for all [All Destinations].Children, which seems more like total COUNT(timemonthly_id).

      Database is PostgreSQL.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              lightoze Vladimir Kulev
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: