<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">WITH SET ... is a named set.&nbsp; Named sets are evaluated in the default context - no slicer at all.<br><br>Michael<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Message d'origine ----<br>De : John V. Sichi &lt;jsichi@gmail.com&gt;<br>À : mondrian@pentaho.org<br>Envoyé le : Dimanche, 4 Février 2007, 3h50mn 51s<br>Objet&nbsp;: [Mondrian] question on "circular" MDX<br><br><div>If I run the query below with native crossjoins enabled, it comes back <br>with an answer.&nbsp;&nbsp;But if I run it with <br>mondrian.native.crossjoin.enable=false, it fails with a stack overflow. <br>&nbsp;&nbsp;There's clearly a bug, in that the behavior should be the same <br>regardless of the
 implementation.&nbsp;&nbsp;And if it should fail, it would be <br>nice to fail with a validation error regarding the circularity (rather <br>than a stack overflow).<br><br>The cycle in the non-native case is as follows.&nbsp;&nbsp;The calculated members <br>in the slicer depend on named set CJ, the result of some <br>NonEmptyCrossJoins.&nbsp;&nbsp;But those NECJ's in turn depend on the slicer for <br>deciding non-emptiness of each candidate tuple.<br><br>There's some further problem with the calculated member manipulation in <br>that it requires two calculated members to fail; with just one <br>calculated member in the slicer, it succeeds regardless of whether <br>native crossjoin is used.&nbsp;&nbsp;Unless I'm misunderstanding the cause of the <br>problem, if it's going to fail in one case, it should fail in the other.<br><br>Any opinions on the correct behavior?<br><br>with<br>set BM_PRODUCT as {[Product].[All Products].[Drink]}<br>set BM_EDU as [Education
 Level].[Education Level].Members<br>set BM_GENDER as {[Gender].[Gender].[M]}<br>set CJ as NonEmptyCrossJoin(BM_GENDER,NonEmptyCrossJoin(BM_EDU,BM_PRODUCT))<br>set GM_PRODUCT as Generate(CJ, {[Product].CurrentMember})<br>set GM_EDU as Generate(CJ, {[Education Level].CurrentMember})<br>set GM_GENDER as Generate(CJ, {[Gender].CurrentMember})<br>set GM_MEASURE as {[Measures].[Unit Sales]}<br>member [Education Level].FILTER1 as Aggregate(GM_EDU)<br>member [Gender].FILTER2 as Aggregate(GM_GENDER)<br>select<br>GM_PRODUCT on rows,<br>GM_MEASURE on columns<br>from [Sales]<br>where ([Education Level].FILTER1, [Gender].FILTER2);<br><br>JVS<br>_______________________________________________<br>Mondrian mailing list<br>Mondrian@pentaho.org<br><a target="_blank" href="http://lists.pentaho.org/mailman/listinfo/mondrian">http://lists.pentaho.org/mailman/listinfo/mondrian</a><br></div></div><br></div></div><br>
                <hr size="1"> 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur <a href="http://fr.rd.yahoo.com/evt=42054/*http://fr.answers.yahoo.com">Yahoo! Questions/Réponses</a>.</body></html>