[Mondrian] Multiple sets in where clause

Julian Hyde jhyde at pentaho.com
Fri May 4 00:37:47 EDT 2012

On Thu 03 May 2012 05:27:34 PM WEST, Pedro Alves wrote:
Is it supported without ussing calculated (aggregated) members?

Where <set> works.

where (<member>,<member>) works

where ( <set> * <set> works but this isn't a very optimal approach.

I feel I'm missing something very very obvious

Pedro you may be missing something obvious but I'm not sure what it is.

Remember that in MDX:

 *    ( ... ) is the syntax for a tuple. Members must be from different hierarchies.
 *   { ... } is the syntax for a set. Elements in the set must be members (or tuples) with the same dimensionality.

You can write

WHERE {h1.m1, h1.m2} * {h2.m1}


WHERE CROSSJOIN({h1.m1, h1.m2},  {h2.m1})


WHERE {(h1.m1, h2.,1), (h1.m2, m2.m2)}

and they are all valid and equivalent.

Am 03.05.2012 um 18:30 schrieb Pedro Alves <pmgalves at gmail.com<mailto:pmgalves at gmail.com>>:

Bah - from http://jira.pentaho.com/browse/MONDRIAN-555 I take it it's a
no? :S

No, that bug only relates if you have ancestor and descendant members in the same set. It will affect totals to a value that is arguably wrong, but the slicer should still work.


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

More information about the Mondrian mailing list