[Mondrian] Wrong result for TopCount using calculated measure

m.xinu mehdi_xinu at yahoo.com
Mon Dec 24 11:24:32 EST 2012


Hi,

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">
<Formula>
[Measures].[MainAccAmount] + [Measures].[IntblockedAccAmount] + [Measures].[BlockedAccAmount]
</Formula>
</CalculatedMember>


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/b9aee3a7/attachment.html 


More information about the Mondrian mailing list