[Mondrian] Wrong result for TopCount using calculated measure

Kurtis Walker kwalker at pentaho.com
Mon Dec 24 11:37:54 EST 2012

Seems like a bug to me.  What version of mondrian are you using?

On Monday, December 24, 2012 10:24:32 AM m. xinu wrote:


I defined a calculated member in [Measures] dimension, and when I execute the following MDX:

select TopCount([ExpireDate].[Month].Members, 10, [Measures].[TotalAmount]) ON COLUMNS,
  [Measures].[TotalAmount] ON ROWS
from [Deposit]

the result is wrong, but when I use Order() function instead of TopCount, the result is OK. In fact the following MDX works fine:

select Head(Order([ExpireDate].[Month].Members, [Measures].[TotalAmount], DESC), 10) ON COLUMNS,
  [Measures].[TotalAmount] ON ROWS
from [Deposit]

The [Measures].[TotalAmount] is a calculated member defined in Mondrian schema as follows:

<CalculatedMember name="TotalAmount" dimension="Measures">
[Measures].[MainAccAmount] + [Measures].[IntblockedAccAmount] + [Measures].[BlockedAccAmount]

Is it a bug? or did I use something wrong?

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

More information about the Mondrian mailing list