I think there is already and issue related to this one <a href="http://jira.pentaho.com/browse/MONDRIAN-495">http://jira.pentaho.com/browse/MONDRIAN-495</a><br>Thanks.<br><br><div class="gmail_quote">On Mon, Apr 20, 2009 at 1:51 PM, Julian Hyde <span dir="ltr">&lt;<a href="mailto:jhyde@pentaho.com">jhyde@pentaho.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



<div>
<div><span><font color="#000080" size="2" face="Lucida Sans">So, I think the bug is that a filter supplied for a DIMENSION table is 
only applied at the first level of the dimension. The filter on the fact table 
works OK</font></span><span><font color="#000080" size="2" face="Lucida Sans">.</font></span></div>
<div><span><font color="#000080" size="2" face="Lucida Sans"></font></span> </div>
<div><span><font color="#000080" size="2" face="Lucida Sans">If this is correct, please log a jira case.</font></span></div>
<div><span><font color="#000080" size="2" face="Lucida Sans"></font></span> </div>
<div><span><font color="#000080" size="2" face="Lucida Sans">Julian</font></span></div><br>
<blockquote style="border-left: 2px solid rgb(0, 0, 128); padding-left: 5px; margin-left: 5px; margin-right: 0px;">
  <div dir="ltr" align="left" lang="en-us">
  <hr>
  <font size="2" face="Tahoma"><b>From:</b> Diego Dimunzio 
  [mailto:<a href="mailto:ddimunzio@gmail.com" target="_blank">ddimunzio@gmail.com</a>] <br><b>Sent:</b> Monday, April 20, 2009 8:00 
  AM<br><b>To:</b> <a href="mailto:jhyde@pentaho.com" target="_blank">jhyde@pentaho.com</a>; Mondrian developer mailing 
  list<div class="im"><br><b>Subject:</b> Re: [Mondrian] Presentation and 
  doubt<br></div></font><br></div>
  <div></div><br><br><div><div></div><div class="h5">
  <div class="gmail_quote">On Mon, Apr 20, 2009 at 11:06 AM, Diego Dimunzio <span dir="ltr">&lt;<a href="mailto:ddimunzio@gmail.com" target="_blank">ddimunzio@gmail.com</a>&gt;</span> 
wrote:<br>
  <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br><br>
    <div class="gmail_quote">
    <div>
    <div></div>
    <div>On Fri, Apr 17, 2009 at 4:39 PM, Julian Hyde <span dir="ltr">&lt;<a href="mailto:jhyde@pentaho.com" target="_blank">jhyde@pentaho.com</a>&gt;</span> wrote:<br></div></div>
    <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
      <div>
      <div></div>
      <div>
      <div>
      <div>
      <div><font color="#000080" size="2" face="Lucida Sans"></font> </div><br>
      <blockquote style="border-left: 2px solid rgb(0, 0, 128); padding-left: 5px; margin-left: 5px; margin-right: 0px;">
        <div dir="ltr" align="left" lang="en-us"><font size="2" face="Tahoma">Diego 
        Dimunzio<span><font color="#000080" face="Lucida Sans">  
        wrote: </font></span><br></font></div>
        <div></div>
        <p><span style="font-family: &#39;Courier New&#39;;">Julian,<br></span></p>
        <p><span style="font-family: &#39;Courier New&#39;;">Yes, you are right that post 
        was based in your blog, It was the first link I found today when was 
        looking for an post about it.</span></p>
        <p><span style="font-family: &#39;Courier New&#39;;">Btw. I have some 
        questions.</span></p>
        <p style="text-indent: -18pt;"><span style="font-family: &#39;Courier New&#39;;"><span>1-<span style="font-family: &#39;Times New Roman&#39;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">  
        </span></span></span><span style="font-family: &#39;Courier New&#39;;">Does 
        someone have tried to use a member 
        reader?<br><span> </span>According with the documentation you have 
        to implement “<a href="http://mondrian.pentaho.org/api/mondrian/rolap/MemberSource.html" target="_blank">mondrian.rolap.MemberSource</a>” but this interface use 
        “mondrian.rolap.MemberCache” which is not a public interface then you 
        can’t implement the method setCache (MemberCache cache)<span><font color="#000080" size="2" face="Lucida Sans"> </font></span></span></p></blockquote></div>
      <p style="text-indent: -18pt;"><span style="font-family: &#39;Courier New&#39;;"><span><font color="#000080" size="2" face="Lucida Sans">We discussed custom MemberReaders on the list on 
      2009/4/7. I couldn&#39;t find the message in the archive, so I have attached 
      the message.</font> </span></span></p>
      <div>
      <blockquote style="border-left: 2px solid rgb(0, 0, 128); padding-left: 5px; margin-left: 5px; margin-right: 0px;"><span style="font-family: &#39;Courier New&#39;;"><span>
        <p style="text-indent: -18pt;"><font color="#000080" size="2" face="Lucida Sans"></font><font color="#000080" size="2" face="Lucida Sans"></font><br></p></span></span>
        <p style="text-indent: -18pt;"><span style="font-family: &#39;Courier New&#39;;"><span>2-<span style="font-family: &#39;Times New Roman&#39;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">  
        </span></span></span><span style="font-family: &#39;Courier New&#39;;">I am 
        trying to do something that I not sure if it’s possible</span></p>
        <p><span style="font-family: &#39;Courier New&#39;;">I have a dimension which 
        comes from the fact table and I added selection criteria to filter out 
        the result. <span><font color="#000080" size="2" face="Lucida Sans"> </font></span></span></p></blockquote></div>
      <p><span style="font-family: &#39;Courier New&#39;;"><span><font color="#000080" size="2" face="Lucida Sans">There are some issues with table filters. One 
      is <a href="http://jira.pentaho.com/browse/MONDRIAN-495" target="_blank"><font color="#0066cc" face="Times New Roman">http://jira.pentaho.com/browse/MONDRIAN-495</font></a>, but 
      you are probably seeing another. </font></span></span><span style="font-family: &#39;Courier New&#39;;"><span><font color="#000080" size="2" face="Lucida Sans">(One change 5 years ago, <a href="http://p4webhost.eigenbase.org:8080/@md=d&amp;c=6PU@2752?ac=10" target="_blank"><font color="#0066cc" face="Times New Roman">http://p4webhost.eigenbase.org:8080/@md=d&amp;c=6PU@2752?ac=10</font></a>, 
      added 3 features and didn&#39;t add tests or documentation for any of them. 
      Since this feature is not tested I am not confident that it 
      works.)</font> </span></span></p>
      <div>
      <blockquote style="border-left: 2px solid rgb(0, 0, 128); padding-left: 5px; margin-left: 5px; margin-right: 0px;">
        <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; color: teal; font-family: &#39;Courier New&#39;;">&lt;</span><span style="background: silver none repeat scroll 0% 0%; font-size: 10pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(63, 127, 127); font-family: &#39;Courier New&#39;;">Dimension</span><span style="font-size: 10pt; font-family: &#39;Courier New&#39;;"> <span style="color: rgb(127, 0, 127);">name</span><span style="color: black;">=</span><i><span style="color: rgb(42, 0, 255);">&quot;Dname&quot;</span></i><span style="color: teal;">&gt;</span></span></p>

        <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; color: teal; font-family: &#39;Courier New&#39;;">&lt;</span><span style="font-size: 10pt; color: rgb(63, 127, 127); font-family: &#39;Courier New&#39;;">Hierarchy</span><span style="font-size: 10pt; font-family: &#39;Courier New&#39;;"> <span style="color: rgb(127, 0, 127);">hasAll</span><span style="color: black;">=</span><i><span style="color: rgb(42, 0, 255);">&quot;true&quot;</span></i> <span style="color: rgb(127, 0, 127);">allMemberName</span><span style="color: black;">=</span><i><span style="color: rgb(42, 0, 255);">&quot;All 
        Dname&quot;</span></i><span style="color: teal;">&gt;</span></span></p>
        <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; color: teal; font-family: &#39;Courier New&#39;;">&lt;</span><span style="font-size: 10pt; color: rgb(63, 127, 127); font-family: &#39;Courier New&#39;;">Table</span><span style="font-size: 10pt; font-family: &#39;Courier New&#39;;"> <span style="color: rgb(127, 0, 127);">name</span><span style="color: black;">=</span><i><span style="color: rgb(42, 0, 255);">&quot;Dtable&quot;</span></i><span style="color: teal;">&gt;</span></span></p>

        <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; color: teal; font-family: &#39;Courier New&#39;;"><span>     
        </span>&lt;</span><span style="font-size: 10pt; color: rgb(63, 127, 127); font-family: &#39;Courier New&#39;;">SQL</span><span style="font-size: 10pt; font-family: &#39;Courier New&#39;;"> <span style="color: rgb(127, 0, 127);">dialect</span><span style="color: black;">=</span><i><span style="color: rgb(42, 0, 255);">&quot;mysql&quot;</span></i><span style="color: teal;">&gt;</span><i><span style="color: rgb(42, 0, 255);"> 
        Dtable</span></i><span style="color: black;"> .classification_name = 
        &#39;Primary&#39;</span><span style="color: teal;">&lt;/</span><span style="color: rgb(63, 127, 127);">SQL</span><span style="color: teal;">&gt;</span></span></p>
        <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; color: teal; font-family: &#39;Courier New&#39;;">&lt;/</span><span style="font-size: 10pt; color: rgb(63, 127, 127); font-family: &#39;Courier New&#39;;">Table</span><span style="font-size: 10pt; color: teal; font-family: &#39;Courier New&#39;;">&gt;</span><span style="font-size: 10pt; font-family: &#39;Courier New&#39;;"></span></p>

        <p style="margin-bottom: 0pt; text-indent: 36pt; line-height: normal;"><span style="font-size: 10pt; color: teal; font-family: &#39;Courier New&#39;;">&lt;</span><span style="font-size: 10pt; color: rgb(63, 127, 127); font-family: &#39;Courier New&#39;;">Level</span><span style="font-size: 10pt; font-family: &#39;Courier New&#39;;"> <span style="color: rgb(127, 0, 127);">name</span><span style="color: black;">=</span><i><span style="color: rgb(42, 0, 255);">&quot;Primary D&quot;</span></i> <span style="color: rgb(127, 0, 127);">column</span><span style="color: black;">=</span><i><span style="color: rgb(42, 0, 255);">&quot;dname&quot;</span></i><span style="color: teal;">/&gt;</span></span></p>

        <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; color: teal; font-family: &#39;Courier New&#39;;">&lt;/</span><span style="font-size: 10pt; color: rgb(63, 127, 127); font-family: &#39;Courier New&#39;;">Hierarchy</span><span style="font-size: 10pt; color: teal; font-family: &#39;Courier New&#39;;">&gt;</span><span style="font-size: 10pt; font-family: &#39;Courier New&#39;;"></span></p>

        <p><span style="font-size: 10pt; color: teal; line-height: 115%; font-family: &#39;Courier New&#39;;">&lt;/</span><span style="background: silver none repeat scroll 0% 0%; font-size: 10pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(63, 127, 127); line-height: 115%; font-family: &#39;Courier New&#39;;">Dimension</span><span style="font-size: 10pt; color: teal; line-height: 115%; font-family: &#39;Courier New&#39;;">&gt;</span></p>

        <p><span style="font-size: 10pt; line-height: 115%; font-family: &#39;Courier New&#39;;">It 
        works properly, Then I would like to have a measure like this</span></p>
        <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; color: teal; font-family: &#39;Courier New&#39;;">&lt;</span><span style="background: silver none repeat scroll 0% 0%; font-size: 10pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(63, 127, 127); font-family: &#39;Courier New&#39;;">Measure</span><span style="font-size: 10pt; font-family: &#39;Courier New&#39;;"> <span style="color: rgb(127, 0, 127);">name</span><span style="color: black;">=</span><i><span style="color: rgb(42, 0, 255);">&quot;Actual&quot;</span></i> <span style="color: rgb(127, 0, 127);">aggregator</span><span style="color: black;">=</span><i><span style="color: rgb(42, 0, 255);">&quot;sum&quot;</span></i> <span style="color: teal;">&gt;</span></span></p>

        <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; color: teal; font-family: &#39;Courier New&#39;;">&lt;</span><span style="font-size: 10pt; color: rgb(63, 127, 127); font-family: &#39;Courier New&#39;;">MeasureExpression</span><span style="font-size: 10pt; color: teal; font-family: &#39;Courier New&#39;;">&gt;</span><span style="font-size: 10pt; font-family: &#39;Courier New&#39;;"></span></p>

        <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; color: black; font-family: &#39;Courier New&#39;;"><span>      
        </span></span><span style="font-size: 10pt; color: teal; font-family: &#39;Courier New&#39;;">&lt;</span><span style="font-size: 10pt; color: rgb(63, 127, 127); font-family: &#39;Courier New&#39;;">SQL</span><span style="font-size: 10pt; font-family: &#39;Courier New&#39;;"> <span style="color: rgb(127, 0, 127);">dialect</span><span style="color: black;">=</span><i><span style="color: rgb(42, 0, 255);">&quot;mysql&quot;</span></i><span style="color: teal;">&gt;</span><span style="color: black;">case when 
        </span><i><span style="color: rgb(42, 0, 255);">Dtable</span></i><span style="color: black;">.type=0<span>  </span></span></span></p>
        <p style="margin-bottom: 0pt; text-indent: 36pt; line-height: normal;"><span style="font-size: 10pt; color: black; font-family: &#39;Courier New&#39;;">Then</span><span style="font-size: 10pt; font-family: &#39;Courier New&#39;;"> <i><span style="color: rgb(42, 0, 255);">Dtable</span></i><span style="color: black;">.amount/CustomSqlfunction(</span><i><span style="color: rgb(42, 0, 255);">Dtable.currencycode</span></i><span style="color: black;">)</span></span></p>

        <p style="margin-bottom: 0pt; text-indent: 36pt; line-height: normal;"><span style="font-size: 10pt; color: black; font-family: &#39;Courier New&#39;;"><span> </span>else 
        0 end</span><span style="font-size: 10pt; font-family: &#39;Courier New&#39;;"></span></p>
        <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; color: black; font-family: &#39;Courier New&#39;;"><span>      
        </span></span><span style="font-size: 10pt; color: teal; font-family: &#39;Courier New&#39;;">&lt;/</span><span style="font-size: 10pt; color: rgb(63, 127, 127); font-family: &#39;Courier New&#39;;">SQL</span><span style="font-size: 10pt; color: teal; font-family: &#39;Courier New&#39;;">&gt;</span><span style="font-size: 10pt; font-family: &#39;Courier New&#39;;"></span></p>

        <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; color: teal; font-family: &#39;Courier New&#39;;">&lt;/</span><span style="font-size: 10pt; color: rgb(63, 127, 127); font-family: &#39;Courier New&#39;;">MeasureExpression</span><span style="font-size: 10pt; color: teal; font-family: &#39;Courier New&#39;;">&gt;</span><span style="font-size: 10pt; font-family: &#39;Courier New&#39;;"></span></p>

        <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; color: teal; font-family: &#39;Courier New&#39;;">&lt;/</span><span style="background: silver none repeat scroll 0% 0%; font-size: 10pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(63, 127, 127); font-family: &#39;Courier New&#39;;">Measure</span><span style="font-size: 10pt; color: teal; font-family: &#39;Courier New&#39;;">&gt;</span></p>

        <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; color: teal; font-family: &#39;Courier New&#39;;"></span> </p>
        <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: &#39;Courier New&#39;;">The measure works 
        for all dimensions members due Mondrian add the dimension filter in the 
        query it makes, but in the total (the first hierarchy) mondrian only use 
        the raw measure without that filter, so the grand total is 
        wrong.</span></p>
        <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: &#39;Courier New&#39;;">Do you know if there 
        a way to make it work?<span><font color="#000080" face="Lucida Sans"> </font></span></span></p>
        <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: &#39;Courier New&#39;;"><span></span></span> </p></blockquote></div>
      <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: &#39;Courier New&#39;;"><span><font color="#000080" face="Lucida Sans">Sounds like another issue with filters. I 
      suggest you turn on SQL tracing and find out which SQL statement against 
      Dtable is being generated without the WHERE clause. Post the results 
      to this list. From the tracing we should be able to figure out which 
      mondrian code is generating the SQL statement without including the 
      filter.</font></span></span></p>
      <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: &#39;Courier New&#39;;"><span><font color="#000080" face="Lucida Sans"></font></span></span> </p><font color="#888888">
      <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: &#39;Courier New&#39;;"><span><font color="#000080" face="Lucida Sans">Julian</font></span></span></p></font></div><br>
</div></div>
      <div>_______________________________________________<br>Mondrian 
      mailing list<br><a href="mailto:Mondrian@pentaho.org" target="_blank">Mondrian@pentaho.org</a><br><a href="http://lists.pentaho.org/mailman/listinfo/mondrian" target="_blank">http://lists.pentaho.org/mailman/listinfo/mondrian</a><br>
<br></div></blockquote></div><br><br>
    <p><span style="font-size: 10pt; line-height: 115%;">Hello Thanks for your 
    response.</span></p>
    <p><span style="font-size: 10pt; line-height: 115%;">After debug a little by 
    adding a break point in the line 244 of RolapUtil.java I realize the filter 
    I added  <span>for the dimension</span></span></p>
    <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; color: teal;">&lt;</span><span style="font-size: 10pt; color: rgb(63, 127, 127);">Dimension</span><span style="font-size: 10pt;"> <span style="color: rgb(127, 0, 127);">name</span><span style="color: black;">=</span><i><span style="color: rgb(42, 0, 255);">&quot;Primary 
    Sector&quot;</span></i><span style="color: teal;">&gt;</span></span></p>
    <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; color: teal;">&lt;</span><span style="font-size: 10pt; color: rgb(63, 127, 127);">Hierarchy</span><span style="font-size: 10pt;"> <span style="color: rgb(127, 0, 127);">hasAll</span><span style="color: black;">=</span><i><span style="color: rgb(42, 0, 255);">&quot;true&quot;</span></i> <span style="color: rgb(127, 0, 127);">allMemberName</span><span style="color: black;">=</span><i><span style="color: rgb(42, 0, 255);">&quot;All 
    Primary Sectors&quot;</span></i><span style="color: teal;">&gt;</span></span></p>
    <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; color: teal;">&lt;</span><span style="font-size: 10pt; color: rgb(63, 127, 127);">Table</span><span style="font-size: 10pt;"> <span style="color: rgb(127, 0, 127);">name</span><span style="color: black;">=</span><i><span style="color: rgb(42, 0, 255);">&quot;cached_v_donor_funding&quot;</span></i><span style="color: teal;">&gt;</span></span></p>

    <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; color: teal;">&lt;</span><span style="font-size: 10pt; color: rgb(63, 127, 127);">SQL</span><span style="font-size: 10pt;"> <span style="color: rgb(127, 0, 127);">dialect</span><span style="color: black;">=</span><i><span style="color: rgb(42, 0, 255);">&quot;mysql&quot;</span></i><span style="color: teal;">&gt;</span><span style="color: black;">classification_name = &#39;Primary&#39; and classification_id = 
    amp_sec_scheme_id and sec_act_id = cc_id</span></span></p>
    <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; color: teal;">&lt;/</span><span style="font-size: 10pt; color: rgb(63, 127, 127);">SQL</span><span style="font-size: 10pt; color: teal;">&gt;</span><span style="font-size: 10pt;"></span></p>

    <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; color: teal;">&lt;/</span><span style="font-size: 10pt; color: rgb(63, 127, 127);">Table</span><span style="font-size: 10pt; color: teal;">&gt;</span><span style="font-size: 10pt;"></span></p>

    <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; color: teal;">&lt;</span><span style="font-size: 10pt; color: rgb(63, 127, 127);">Level</span><span style="font-size: 10pt;"> <span style="color: rgb(127, 0, 127);">name</span><span style="color: black;">=</span><i><span style="color: rgb(42, 0, 255);">&quot;Sector 
    Scheme&quot;</span></i> <span style="color: rgb(127, 0, 127);">column</span><span style="color: black;">=</span><i><span style="color: rgb(42, 0, 255);">&quot;sec_scheme_name&quot;</span></i><span style="color: teal;">/&gt;</span></span></p>

    <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; color: teal;">&lt;</span><span style="font-size: 10pt; color: rgb(63, 127, 127);">Level</span><span style="font-size: 10pt;"> <span style="color: rgb(127, 0, 127);">name</span><span style="color: black;">=</span><i><span style="color: rgb(42, 0, 255);">&quot;Primary 
    Sector&quot;</span></i> <span style="color: rgb(127, 0, 127);">column</span><span style="color: black;">=</span><i><span style="color: rgb(42, 0, 255);">&quot;sectorname&quot;</span></i><span style="color: teal;">/&gt;</span></span></p>

    <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; color: teal;">&lt;/</span><span style="font-size: 10pt; color: rgb(63, 127, 127);">Hierarchy</span><span style="font-size: 10pt; color: teal;">&gt;</span><span style="font-size: 10pt;"></span></p>

    <p><span style="font-size: 10pt; color: teal; line-height: 115%;">&lt;/</span><span style="font-size: 10pt; color: rgb(63, 127, 127); line-height: 115%;">Dimension</span><span style="font-size: 10pt; color: teal; line-height: 115%;">&gt;</span><span style="font-size: 10pt; line-height: 115%;"></span></p>

    <p><span style="font-size: 10pt; line-height: 115%;">Is never applied, I 
    think it happens due I have a dynamic filter in the fact table what I use to 
    filter the cube info</span></p>
    <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; color: teal;">&lt;</span><span style="font-size: 10pt; color: rgb(63, 127, 127);">Table</span><span style="font-size: 10pt;"> <span style="color: rgb(127, 0, 127);">name</span><span style="color: black;">=</span><i><span style="color: rgb(42, 0, 255);">&quot;cached_v_donor_funding&quot;</span></i> <span style="color: teal;">&gt;</span></span></p>

    <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; color: teal;">&lt;</span><span style="font-size: 10pt; color: rgb(63, 127, 127);">SQL</span><span style="font-size: 10pt;"> <span style="color: rgb(127, 0, 127);">dialect</span><span style="color: black;">=</span><i><span style="color: rgb(42, 0, 255);">&quot;mysql&quot;</span></i><span style="color: teal;">&gt;&lt;![CDATA[</span><span style="color: black;">cached_v_donor_funding.amp_activity_id IN 
    (@donorquery)</span><span style="color: teal;">]]&gt;</span><span style="color: black;"> </span></span></p>
    <p style="margin-bottom: 0pt; line-height: normal;"><span style="font-size: 10pt; color: teal;">&lt;/</span><span style="font-size: 10pt; color: rgb(63, 127, 127);">SQL</span><span style="font-size: 10pt; color: teal;">&gt;</span><span style="font-size: 10pt;"></span></p>

    <p><span style="font-size: 10pt; color: teal; line-height: 115%;">&lt;/</span><span style="font-size: 10pt; color: rgb(63, 127, 127); line-height: 115%;">Table</span><span style="font-size: 10pt; color: teal; line-height: 115%;">&gt;</span></p>

    <p><span style="font-size: 10pt; line-height: 115%;"><span> </span>When 
    the user change the workspace I replace this text <span style="color: black;">@donorquery, using the schema proccessor plug-in, for a 
    pre generated sql query, this filter works properlly for all 
    queries.</span></span></p>
    <p><span style="font-size: 10pt; line-height: 115%;">This is the sql query 
    that Mondrian makes for the measure the first filter is applied but it 
    does&#39;s apply <span> </span>the filter that comes from the 
    dimension.</span></p>
    <p><span style="font-size: 10pt; line-height: 115%;">select 
    <span>  </span>cached_v_donor_funding.`sec_scheme_name` as 
    `c0`,<br>cached_v_donor_funding.`sectorname` as `c1`,<br>sum(case<br>when 
    cached_v_donor_funding.transaction_type = 0 
    and<br>cached_v_donor_funding.adjustment_type = 1 
    then<br><span> </span>cached_v_donor_funding.transaction_amount / 
    getExchangeWithFixed(<br>cached_v_donor_funding.currency_code, 
    cached_v_donor_funding.transaction_date,<br>cached_v_donor_funding.fixed_exchange_rate) 
    else 0<br><span> </span>end) as `m0`<br>from `cached_v_donor_funding` 
    as `cached_v_donor_funding`<br>where (cached_v_donor_funding.amp_activity_id 
    IN <span style="color: red;">(SELECT distinct (amp_activity_id) FROM 
    cached_amp_activity WHERE 1 = 1 AND amp_activity_id IN (SELECT 
    amp_activity_id FROM cached_amp_activity WHERE amp_team_id IS NOT NULL AND 
    amp_team_id IN (70) OR amp_activity_id IN (SELECT ata.amp_activity_id FROM 
    amp_team_activities ata WHERE ata.amp_team_id IN (70)))))</span> and 
    `cached_v_donor_funding`.`sec_scheme_name` = &#39;Classification Sectorielle 
    DAC-CRS&#39;<br>group by 
    `cached_v_donor_funding`.`sec_scheme_name`,<br><span> </span>`cached_v_donor_funding`.`sectorname`</span></p><br>In 
    red you can see the &quot;Dinamic&quot; filter,  Actually  I am not sure if 
    it&#39;s a bug or something that can&#39;t be done. what do you 
  think?<br></blockquote></div><br><br>---------------------------<br><br>
  
  
  
  

  <p>In fact the filter only is applied in first level of the 
  dimension.</p>
  <p><span style="font-size: 10pt; line-height: 115%;">select 
  `cached_v_donor_funding`.`sec_scheme_name` as `c0`<br>from 
  `cached_v_donor_funding` as `cached_v_donor_funding`<br><span style="color: red;">where (classification_name = &#39;Primary&#39; 
  and<br>      classification_id = amp_sec_scheme_id 
  and<br>      sec_act_id = cc_id)</span><br>group by 
  `cached_v_donor_funding`.`sec_scheme_name`<br>order by 
  ISNULL(`cached_v_donor_funding`.`sec_scheme_name`),<br>         
  `cached_v_donor_funding`.`sec_scheme_name` ASC</span></p>Then it&#39;s missing in 
  the second level and in the measure.<br></div></div></blockquote></div>
</blockquote></div><br><br clear="all"><br>-- <br>Diego Andres Dimunzio<br>