[Mondrian] VisualTotals + Distinct-count measure gives wrong results

Sergey Mazin sergey.mazin at skype.net
Thu Jan 21 11:17:25 EST 2010

Hi Julian,




[Measures].[Number of Employees] - is distinct count measure. 


WITH SET [XL_Row_Dim_0] AS 
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.


In distinct query cells are not being evaluated properly and no queries is
sent to database.

Could you please advise what is the best place to start investigating.


Best regards,


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100121/d252bcb0/attachment.html 

More information about the Mondrian mailing list