[Mondrian] IIF and Filter function parameters

Thiyagu Palanisamy tpalanis at thoughtworks.com
Tue Apr 3 12:42:03 EDT 2007

The iif function in MSAS takes in variant type in second and third 
parameter whereas mondrian iif function only takes in 
<string, string> or <number, number> as its second and third argument. 
This causes iif function calls like iif(<boolean expr>,<boolean expr>, 
<numeric expression>)
to fail. 

The same behavior is also observed in filter function. Filter function in 
MSAS takes in boolean as well as numeric expression
whereas filter function in mondrian only takes in boolean as a second 

If we add capability to convert between boolean and other scalar types 
(string, numeric) it will take care of many of these scenarios, 

Sample mdx working with MSAS
SELECT Filter(Store.allmembers, iif(measures.profit < 400000 
,[store].currentMember.NAME = "USA", true)) on 0 FROM SALES

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20070403/798d069a/attachment.html 

More information about the Mondrian mailing list