<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><base href="x-msg://1260/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I think we should change current behavior to be compatible with Analysis Services. I doubt that anyone is relying on the current, incorrect behavior.<div><br><div apple-content-edited="true">
<div>Julian</div><br class="Apple-interchange-newline">
</div>
<br><div><div>On May 17, 2013, at 8:47 AM, Matt Campbell <<a href="mailto:mcampbell@pentaho.com">mcampbell@pentaho.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div lang="EN-US" link="blue" vlink="purple" style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="WordSection1" style="page: WordSection1; "><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">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,<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 9.5pt; font-family: Consolas; color: maroon; ">Exists</span><span style="font-size: 9.5pt; font-family: Consolas; ">([Customers].[Name].<span style="color: blue; ">members</span>,<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 9.5pt; font-family: Consolas; "> [Customers].[All Customers].[USA].[OR])<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 9.5pt; font-family: Consolas; "> </span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">will return the set of Customers in [OR].<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">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):<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 9.5pt; font-family: Consolas; color: maroon; ">Exists</span><span style="font-size: 9.5pt; font-family: Consolas; ">([Customers].[Name].<span style="color: blue; ">members</span>,<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 9.5pt; font-family: Consolas; "> [Product].[All Products].[Drink]) <o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 9.5pt; font-family: Consolas; "> </span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">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 3<sup>rd</sup><span class="Apple-converted-space"> </span>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).<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">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<span class="Apple-converted-space"> </span><i>will</i><span class="Apple-converted-space"> </span>return all customers:<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 9.5pt; font-family: Consolas; color: maroon; ">Exists</span><span style="font-size: 9.5pt; font-family: Consolas; ">([Customers].[Name].<span style="color: blue; ">members</span><span class="Apple-converted-space"> </span>* Product.[All Products],<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 9.5pt; font-family: Consolas; "> [Product].[All Products].[Drink])<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">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? <o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 9.5pt; font-family: Consolas; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div></div>_______________________________________________<br>Mondrian mailing list<br><a href="mailto:Mondrian@pentaho.org" style="color: purple; text-decoration: underline; ">Mondrian@pentaho.org</a><br><a href="http://lists.pentaho.org/mailman/listinfo/mondrian" style="color: purple; text-decoration: underline; ">http://lists.pentaho.org/mailman/listinfo/mondrian</a><br></div></blockquote></div><br></div></body></html>