Pentaho Analysis - Mondrian
  1. Pentaho Analysis - Mondrian
  2. MONDRIAN-682

VisualTotals + Distinct-count measure gives wrong results

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Medium 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.

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

        Activity

        Hide
        Sergey Mazin added a comment -

        Exception in makeCompoundGroup method when dealing with VisualTotalMember's

        Show
        Sergey Mazin added a comment - Exception in makeCompoundGroup method when dealing with VisualTotalMember's
        Hide
        Sergey Mazin added a comment -

        RolapAggregationManager.java
        RolapResult.java
        VisualTotalFunDef.java
        FunctionTest.java

        here is implementation for distinct count measure and VisualTotals
        3 new testcases is added

        can anybody check it and if everything is ok then integrate?

        Show
        Sergey Mazin added a comment - RolapAggregationManager.java RolapResult.java VisualTotalFunDef.java FunctionTest.java here is implementation for distinct count measure and VisualTotals 3 new testcases is added can anybody check it and if everything is ok then integrate?
        Hide
        Julian Hyde added a comment -

        Fixed in change 13711. Will be in mondrian-3.2.1.

        Show
        Julian Hyde added a comment - Fixed in change 13711. Will be in mondrian-3.2.1.

          People

          • Assignee:
            Julian Hyde
            Reporter:
            Sergey Mazin
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: