<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<STYLE>.hmmessage P {
        PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 0px
}
BODY.hmmessage {
        FONT-FAMILY: Tahoma; FONT-SIZE: 10pt
}
</STYLE>

<META name=GENERATOR content="MSHTML 8.00.6001.19019"></HEAD>
<BODY class=hmmessage>
<DIV><SPAN class=763465818-02032011><FONT color=#000080 
face="Lucida Sans">Obviously you&nbsp;need to filter out the rows before you sum 
them, not after. (After you have summed, say, all of the sales in a particular 
year and region, the total will obviously be large, even though many of the 
contributing cells might be &lt;4.)</FONT></SPAN></DIV>
<DIV><SPAN class=763465818-02032011><FONT color=#000080 
face="Lucida Sans"></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=763465818-02032011><FONT color=#000080 face="Lucida Sans">In 
cases such as this, you need to do the filtering in SQL, 
viz:</FONT></SPAN></DIV>
<DIV><SPAN class=763465818-02032011><FONT color=#000080 
face="Lucida Sans"></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=763465818-02032011><FONT color=#000080 
face="Lucida Sans">&lt;Measure name="Quantity" datatype="Integer" 
aggregator="sum" visible="true"&gt;</FONT></SPAN></DIV>
<DIV><SPAN class=763465818-02032011><FONT color=#000080 
face="Lucida Sans">&nbsp; &lt;MeasureExpression&gt;</FONT></SPAN></DIV>
<DIV><SPAN class=763465818-02032011><FONT color=#000080 
face="Lucida Sans">&nbsp;&nbsp;&nbsp; &lt;SQL 
dialect="generic"&gt;</FONT></SPAN></DIV>
<DIV><SPAN class=763465818-02032011><FONT color=#000080 
face="Lucida Sans">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case when quantity &gt; 4 then 
quantity else null end</FONT></SPAN></DIV>
<DIV><SPAN class=763465818-02032011><FONT color=#000080 
face="Lucida Sans">&nbsp;&nbsp;&nbsp; &lt;/SQL&gt;</FONT></SPAN></DIV>
<DIV><SPAN class=763465818-02032011><FONT color=#000080 
face="Lucida Sans">&nbsp; &lt;/MeasureExpression&gt;</FONT></SPAN></DIV>
<DIV><SPAN class=763465818-02032011><FONT color=#000080 
face="Lucida Sans">&lt;/Measure&gt;</FONT></SPAN></DIV>
<DIV><SPAN class=763465818-02032011><FONT color=#000080 
face="Lucida Sans"></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=763465818-02032011><FONT color=#000080 
face="Lucida Sans">Julian</FONT></SPAN></DIV>
<DIV><SPAN class=763465818-02032011><FONT color=#000080 
face="Lucida Sans"></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=763465818-02032011><FONT color=#000080 face="Lucida Sans">PS 
Please send future emails to <A 
href="mailto:mondrian@pentaho.org">mondrian@pentaho.org</A>. The <A 
href="mailto:mondrian-devel@lists.sourceforge.net">mondrian-devel@lists.sourceforge.net</A> 
list is obsolete.</FONT></SPAN></DIV><BR>
<BLOCKQUOTE 
style="BORDER-LEFT: #000080 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px" 
dir=ltr>
  <DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma><B>From:</B> Anderson C. Carniel 
  [mailto:anderson_lp789@hotmail.com] <BR><B>Sent:</B> Wednesday, March 02, 2011 
  5:24 AM<BR><B>To:</B> 
  mondrian-devel-owner@lists.sourceforge.net<BR><B>Subject:</B> Filtering 
  measure values<BR></FONT><BR></DIV>
  <DIV></DIV>Hi!<BR><PRE> <BR>I would like to aggregate the sum of revenue and filter the measure<BR>value, e.g., where quantity&gt;4, following this description:<BR> <BR> &lt;Measure name="Quantity" column="quantity" datatype="Integer"<BR>aggregator="sum" visible="true"&gt;<BR>&lt;/Measure&gt;<BR>&lt;Measure name="Revenue" column="revenue" datatype="Numeric"<BR>aggregator="sum" visible="true"&gt;<BR>&lt;/Measure&gt;<BR> <BR>Using SQL, I would simply issue: select sum(revenue) from table where<BR>quantity &gt; 4;<BR> <BR>However, how could I perform such filter using MDX?<BR> <BR>Regards,<BR> <BR>Anderson</PRE></BLOCKQUOTE></BODY></HTML>