[Mondrian] Exists()

Julian Hyde jhyde at pentaho.com
Fri May 17 12:31:29 EDT 2013


I think we should change current behavior to be compatible with Analysis Services. I doubt that anyone is relying on the current, incorrect behavior.

Julian


On May 17, 2013, at 8:47 AM, Matt Campbell <mcampbell at pentaho.com<mailto:mcampbell at pentaho.com>> wrote:


According to the docs, Exists() “returns the set of tuples of the first set specified that exist with one or more tuples of the second set specified.”  So,

Exists([Customers].[Name].members,
 [Customers].[All Customers].[USA].[OR])

will return the set of Customers in [OR].

I’m looking at a case right now in which the dimension from the set in the first argument is not explicitly included in the second argument (MONDRIAN-1254):

Exists([Customers].[Name].members,
 [Product].[All Products].[Drink])

The person who submitted the case believes this should return some customers, but it currently returns an empty set.  He may be incorrectly expecting the function to take fact data into account and just include customers who have [Drink] data.  Only if the 3rd parameter (Measure Group) is specified will the function limit based on fact data, and the measure group param is currently unsupported in Mondrian (although may be added—see MONDRIAN-1277).

Regardless, I think there is a question of correctness.  With Analysis Services, the set of tuples in the first and second argument implicitly include the default members of all other dimensions.  So with the example above, Analysis Services will return all customers since [Product].[All Products] is implicitly in the first argument, and [All Products] exists within the tuples of the second set.  Mondrian currently returns no customers, but if you explicitly add the [All Products] to the first argument it will return all customers:

Exists([Customers].[Name].members * Product.[All Products],
  [Product].[All Products].[Drink])

So what should Mondrian’s behavior?  Should Mondrian continue to only factor in the explicitly included members in the tuple, or should it include the implicit default members of all other dimensions?


_______________________________________________
Mondrian mailing list
Mondrian at pentaho.org<mailto:Mondrian at pentaho.org>
http://lists.pentaho.org/mailman/listinfo/mondrian

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


More information about the Mondrian mailing list