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

VisualTotals + Distinct-count measure gives wrong results

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Severity: Medium
    • Resolution: Fixed
    • Affects Version/s: 3.2.0 GA (3.6.0 GA Suite Release)
    • Component/s: None
    • 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

      [Measures].[Number of Employees] - is distinct count measure.

      Example:

      WITH SET [XL_Row_Dim_0] AS
      'VisualTotals(Distinct(Hierarchize(

      { Ascendants([Store].[All Stores].[USA].[OR]), Descendants([Store].[All Stores].[USA].[OR]), Ascendants([Store].[All Stores].[USA].[CA]), Descendants([Store].[All Stores].[USA].[CA])}

      )))'
      SELECT NON EMPTY Hierarchize(Intersect({DrilldownLevel(

      { [Store].[All Stores] })}

      , [XL_Row_Dim_0])) ON COLUMNS
      FROM [HR] WHERE ([Measures].[Number of Employees])

      Query should return:

      Axis #0:

      {[Measures].[Number of Employees]}

      Axis #1:

      {[Store].[All Stores]} {[Store].[All Stores].[USA]}

      Row #0: 329
      Row #0: 329

      But returns empty set.

      The same query with NOT distinct measure works.

        Attachments

        1. FunctionTest.java
          481 kB
        2. RolapAggregationManager.java
          29 kB
        3. RolapResult.java
          77 kB
        4. VisualTotalsFunDef.java
          13 kB

          Activity

            People

            • Assignee:
              jhyde Julian Hyde (Inactive)
              Reporter:
              sergey.mazin Sergey Mazin
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: