[Mondrian] Unexpected behaviour while using a TopCount in a Named Set

Julian Hyde jhyde at pentaho.com
Wed Jul 11 14:27:30 EDT 2012


On Jul 11, 2012, at 10:35 AM, Pedro Salgueiro wrote:

> We are 95% sure that the results from executing this query against the 
> Foodmart in the master branch of Mondrian produces wrong results:
> 
>     WITH
>     SET [Top Count] AS
>     {
>         TopCount(
>             DISTINCT([Customers].[Name].Members),
>             5,
>             [Measures].[Unit Sales]
>         )
>     }
> 
>     SELECT
>     [Top Count] * [Measures].[Unit Sales] on 0
>     FROM [Sales]
>     WHERE [Time].[1997].[Q1].[1]:[Time].[1997].[Q3].[8]

I agree. The query gives different results with and without the DISTINCT for me also.

Can you please log a jira case. Mention TopCount and Range in the WHERE clause in the case summary.

Julian



More information about the Mondrian mailing list