PDA

View Full Version : [Mondrian] IIF and Filter function parameters



Thiyagu Palanisamy
04-03-2007, 02:20 PM
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
parameter..

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


Thanks,
Thiyagu
_______________________________________________
Mondrian mailing list
Mondrian (AT) pentaho (DOT) org
http://lists.pentaho.org/mailman/listinfo/mondrian