[Mondrian] Wrong result for TopCount using calculated measure

m.xinu mehdi_xinu at yahoo.com
Tue Dec 25 00:12:31 EST 2012


I checked it in Mondrian "3.3.0.14703", "3.4.1" and "3.5.0". The results all are the same.



________________________________
 From: Kurtis Walker <kwalker at pentaho.com>
To: mondrian at pentaho.org; m. xinu <mehdi_xinu at yahoo.com> 
Sent: Monday, December 24, 2012 4:37 PM
Subject: Re: [Mondrian] Wrong result for TopCount using calculated measure
 

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:

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


More information about the Mondrian mailing list