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

Native evaluation returns enumerated members in the wrong order

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Medium Medium
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Not Planned
    • Component/s: Native SQL
    • 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

      Given the query SELECT non empty { CrossJoin({ Gender.M, Gender.F}, { [Marital Status].[Marital Status].members } ) } on 0 from sales, the results should include Gender.M values before Gender.F values. However, when natively evaluated, the Gender.F values appear before the Gender.M values.

        Activity

        Hide
        Etienne Neveu added a comment -
        I was about to create a new issue for this, but this seems to be the exact same problem I encountered.

        With the FoodMart sample schema, the following query:

        select [Measures].[Store Sales] ON ROWS,
               NON EMPTY
                  {[Education Level].[All Education Levels].[Graduate Degree],
                  [Education Level].[All Education Levels].[Bachelors Degree],
                  [Education Level].[All Education Levels].[High School Degree]}
               ON COLUMNS
        from [Sales]

        returns a correctly ordered result:

        Axis #1:
        {[Education Level].[All Education Levels].[Graduate Degree]}
        {[Education Level].[All Education Levels].[Bachelors Degree]}
        {[Education Level].[All Education Levels].[High School Degree]}
        Axis #2:
        {[Measures].[Store Sales]}
        [...]

        But as soon as I use a crossjoin:

        select [Measures].[Store Sales] ON ROWS,
               NON EMPTY CrossJoin(
                  {[Education Level].[All Education Levels].[Graduate Degree],
                  [Education Level].[All Education Levels].[Bachelors Degree],
                  [Education Level].[All Education Levels].[High School Degree]}
               , {[Time].[1997].[Q1],[Time].[1997].[Q2]}) ON COLUMNS
        from [Sales]

        the result is (wrongly) ordered alphabetically:

        Axis #1:
        {[Education Level].[All Education Levels].[Bachelors Degree], [Time].[1997].[Q1]}
        {[Education Level].[All Education Levels].[Bachelors Degree], [Time].[1997].[Q2]}
        {[Education Level].[All Education Levels].[Graduate Degree], [Time].[1997].[Q1]}
        {[Education Level].[All Education Levels].[Graduate Degree], [Time].[1997].[Q2]}
        {[Education Level].[All Education Levels].[High School Degree], [Time].[1997].[Q1]}
        {[Education Level].[All Education Levels].[High School Degree], [Time].[1997].[Q2]}
        Axis #2:
        {[Measures].[Store Sales]}
        [...]

        which goes against the "Crossjoin returns the results in the order of the first set expression" (mentioned here: http://mondrian.pentaho.org/documentation/mdx.php ), and which is very annoying for my use case (I need to return these results in a specific order, to exploit them in my PRD report.
        Show
        Etienne Neveu added a comment - I was about to create a new issue for this, but this seems to be the exact same problem I encountered. With the FoodMart sample schema, the following query: select [Measures].[Store Sales] ON ROWS,        NON EMPTY           {[Education Level].[All Education Levels].[Graduate Degree],           [Education Level].[All Education Levels].[Bachelors Degree],           [Education Level].[All Education Levels].[High School Degree]}        ON COLUMNS from [Sales] returns a correctly ordered result: Axis #1: {[Education Level].[All Education Levels].[Graduate Degree]} {[Education Level].[All Education Levels].[Bachelors Degree]} {[Education Level].[All Education Levels].[High School Degree]} Axis #2: {[Measures].[Store Sales]} [...] But as soon as I use a crossjoin: select [Measures].[Store Sales] ON ROWS,        NON EMPTY CrossJoin(           {[Education Level].[All Education Levels].[Graduate Degree],           [Education Level].[All Education Levels].[Bachelors Degree],           [Education Level].[All Education Levels].[High School Degree]}        , {[Time].[1997].[Q1],[Time].[1997].[Q2]}) ON COLUMNS from [Sales] the result is (wrongly) ordered alphabetically: Axis #1: {[Education Level].[All Education Levels].[Bachelors Degree], [Time].[1997].[Q1]} {[Education Level].[All Education Levels].[Bachelors Degree], [Time].[1997].[Q2]} {[Education Level].[All Education Levels].[Graduate Degree], [Time].[1997].[Q1]} {[Education Level].[All Education Levels].[Graduate Degree], [Time].[1997].[Q2]} {[Education Level].[All Education Levels].[High School Degree], [Time].[1997].[Q1]} {[Education Level].[All Education Levels].[High School Degree], [Time].[1997].[Q2]} Axis #2: {[Measures].[Store Sales]} [...] which goes against the "Crossjoin returns the results in the order of the first set expression" (mentioned here: http://mondrian.pentaho.org/documentation/mdx.php ), and which is very annoying for my use case (I need to return these results in a specific order, to exploit them in my PRD report.

          People

          • Assignee:
            Unassigned User
            Reporter:
            Jon Rand
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: