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

Filter() function works incorrectly together with compound WHERE clause

    Details

    • Browser:
      Mozilla Firefox 3.6
    • Operating System/s:
      Ubuntu 10.04
    • QA Validation Status:
      Validated by QA
    • CI Build:
      bi-server-ee-MON33.zip(#60) dated Oct 6, 2011 9:27:15 PM

      Description

      As I wrote in the community forum (http://forums.pentaho.com/showthread.php?80823-Filter-function-works-incorrectly&p=252815#post252815) if I have Filter() function and a WHERE clause in the same MDX query, the system does not filter items correctly. (If I run the query again without the WHERE clause, it filters well. And if after this I re run the query with the WHERE clause, it works fine, filters well!)

      Here is a FoodMart example:

      select NON EMPTY {[Measures].[Unit Sales]} ON COLUMNS,
        Filter([Customers].[Name].Members, ([Measures].[Unit Sales] IS EMPTY)) ON ROWS
      from [Sales]
      where ([Time].[1997].[Q1].[2] : [Time].[1997].[Q4].[10])

      This returns a long list and there are not empty values in the second half of it.

      Don't forget to run this query right after the start up of the Pentaho system! It needs a clean cache.

      This issue is very similar to http://jira.pentaho.com/browse/MONDRIAN-899

        Activity

        Hide
        Julian Hyde added a comment -
        Fixed in change 14149.
        Show
        Julian Hyde added a comment - Fixed in change 14149.
        Hide
        Preethi Muppalla added a comment -
        Tested this issue on CI build dated Oct 6, 2011 9:27:15 PM bi-server-ee-MON33.zip(#60)
        Repro Path:

        - Used Foodmart.xml file.
        - Run the below query right after the start up of the Pentaho system.
        - It needs a clean cache.

         select NON EMPTY {[Measures].[Unit Sales]} ON COLUMNS,
          Filter([Customers].[Name].Members, ([Measures].[Unit Sales] IS EMPTY)) ON ROWS
        from [Sales]
        where ([Time].[1997].[Q1].[2] : [Time].[1997].[Q4].[10])

        - It shows Filter works well with the "where" clause in the first run .
        Please find the attached screen shot.
        Show
        Preethi Muppalla added a comment - Tested this issue on CI build dated Oct 6, 2011 9:27:15 PM bi-server-ee-MON33.zip(#60) Repro Path: - Used Foodmart.xml file. - Run the below query right after the start up of the Pentaho system. - It needs a clean cache.  select NON EMPTY {[Measures].[Unit Sales]} ON COLUMNS,   Filter([Customers].[Name].Members, ([Measures].[Unit Sales] IS EMPTY)) ON ROWS from [Sales] where ([Time].[1997].[Q1].[2] : [Time].[1997].[Q4].[10]) - It shows Filter works well with the "where" clause in the first run . Please find the attached screen shot.

          People

          • Assignee:
            Preethi Muppalla
            Reporter:
            György Novák
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: