[Mondrian] Multiplying two measures interpreted as CrossJoin inIIF()

Julian Hyde jhyde at pentaho.com
Tue Jan 20 23:53:45 EST 2009


> I was coming across an issue with Mondrian 3.0.4 where a numeric
> expression which multiplies two measures was being interpreted as a
> CrossJoin. Below is an example query:
> 
> WITH MEMBER [Measures].[Test]
> AS 'IIF(1=1, [Measures].[Unit Sales] * [Measures].[Store Cost], 0)'
> SELECT {[Measures].[Test]} ON 0 FROM sales
> 
> This query returns an error indicating the following:
> 
> Mondrian Error:No function
> matches signature 'IIF(<Logical Expression>, <Numeric 
> Expression>, <Set>)'
> 
> The asterisk (*) is used to represent multiplication as well as a
> CrossJoin. Is there a way to force Mondrian to interpret the
> expression "[Measures].[Unit Sales] * [Measures].[Store Cost]" as a
> numeric expression. I have some more information on this issue in
> tracker 2525259:
> 
>
https://sourceforge.net/tracker2/?func=detail&aid=2525259&group_id=35302&ati
d=414613

Looks like a valid bug, but the <Member>.Value operator might be a
workaround:

WITH MEMBER [Measures].[Test]
AS 'IIF(1=1, [Measures].[Unit Sales].Value * [Measures].[Store Cost].Value,
0)'
SELECT {[Measures].[Test]} ON 0 FROM sales 

If it is, please update the tracker.

Julian





More information about the Mondrian mailing list