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

Allow rollup of measures based on AVG aggregate function

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Severe Severe
    • Resolution: Fixed
    • Affects Version/s: 3.1.5 GA
    • Component/s: None
    • Labels:
      None
    • Customer Case:
    • CI Build:
      bi-server-ee-MON33.zip, Sep 16, 2011 2:21:10 PM(#26)

      Description

      Allow rollup of measures based on AVG aggregate function.

      In this thread I described how it's difficult: http://forums.pentaho.org/showthread.php?t=56603 But it can be done if there are sum and count measures based on the same column and mondrian is smart enough to rewrite in terms of those measures.

      I've added a test case to CompoundSlicerTest. Search for this bug number.
      1. mon791.xanalyzer
        6 kB
        Suhas Gururaja
      2. pentaho1.log
        27 kB
        Suhas Gururaja
      3. steelwheelsA.mondrian (1).xml
        6 kB
        Suhas Gururaja
      1. 3.8_report.png
        203 kB
      2. 4.0_report.png
        281 kB

        Issue Links

          Activity

          Hide
          Man Shing Yau added a comment -
          New customer added
          Show
          Man Shing Yau added a comment - New customer added
          Hide
          Julian Hyde added a comment -
          Partially fixed in change 14149 (will be in mondrian-3.3).
          Show
          Julian Hyde added a comment - Partially fixed in change 14149 (will be in mondrian-3.3).
          Hide
          Julian Hyde added a comment -
          It would help everyone if this issue were boiled down to an MDX statement that fails against FoodMart. (I burned quite a lot of time on this issue solving what turned out to be the wrong problem.) Can someone please provide that?
          Show
          Julian Hyde added a comment - It would help everyone if this issue were boiled down to an MDX statement that fails against FoodMart. (I burned quite a lot of time on this issue solving what turned out to be the wrong problem.) Can someone please provide that?
          Hide
          Luc Boudreau added a comment -
          Fixed and tested in revision 14516. I have implemented a basic algorithm to attempt an AVG rollup which scans the cube's measures and tries to find a COUNT and a SUM measures to perform the avg rollup. If the cube has both a COUNT and a SUM measure defined on the same column, the AVG rollup can take place. If not, it throws an exception telling it couldn't perform an AVG rollup.
          Show
          Luc Boudreau added a comment - Fixed and tested in revision 14516. I have implemented a basic algorithm to attempt an AVG rollup which scans the cube's measures and tries to find a COUNT and a SUM measures to perform the avg rollup. If the cube has both a COUNT and a SUM measure defined on the same column, the AVG rollup can take place. If not, it throws an exception telling it couldn't perform an AVG rollup.
          Hide
          Suhas Gururaja added a comment -
          Tested this issue on CI build dated Sep 16, 2011 2:21:10 PM (#26).

          Repro:

          1) Please use the attached schema file.
          2) Login to PUC.
          3)Click on New Analyzer report.
          4)Select Asteelwheels cube.
          5) Drag and drop Territory, Sales, Quantity and Average sales.
          6) Note that there will be no error reported in the log.
          Please find the attached screen shot and the log file. This issue is fixed.
          Show
          Suhas Gururaja added a comment - Tested this issue on CI build dated Sep 16, 2011 2:21:10 PM (#26). Repro: 1) Please use the attached schema file. 2) Login to PUC. 3)Click on New Analyzer report. 4)Select Asteelwheels cube. 5) Drag and drop Territory, Sales, Quantity and Average sales. 6) Note that there will be no error reported in the log. Please find the attached screen shot and the log file. This issue is fixed.

            People

            • Assignee:
              Suhas Gururaja
              Reporter:
              Julian Hyde
            • Votes:
              9 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: