[Mondrian] MDX Conversion from Numeric to boolean
Anton Nikitin
cybernelly at gmail.com
Mon Apr 23 13:48:17 EDT 2007
Hello.
I have found one little incompatibility between Mondrian and MSOLAP MDX.
Mondrian doesn't automatically convert integer values to Boolean if
necessary.
Example (Foodmart Sales) - let's display all Baked Goods which are
non-leaves:
select
{[Measures].[Unit Sales]} on columns,
Filter(Descendants([Product].[Food].[Baked Goods].[Bread]),
Count ([Product].currentMember.children)) on Rows
from [Sales]
This query works OK in MSAS 2000, but fails in Mondrian 2.3.2:
mondrian.olap.MondrianException: Mondrian Error:No function matches
signature 'Filter(<Set>, <Numeric Expression>)'
At the same time, if we modify it a bit, it starts to work in Mondrian:
select
{[Measures].[Unit Sales]} on columns,
Filter(Descendants([Product].[Food].[Baked Goods].[Bread]),
Count ([Product].currentMember.children)<>0) on Rows
from [Sales]
AFAIK the solution is rather cheap (changing FunUtil.canConvert() &
FunUtil.convert()).
I assume it is a bug.
Best regards,
Anton Nikitin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20070423/af124345/attachment.html
More information about the Mondrian
mailing list