AFAIK, we do not support arbitrary properties over calculated members. That being said, .Name and .Properties should return the correct name and an empty property collection (or at least the name property I guess). There are other properties which should probably be supported as well, like the ordering. Please create a jira case to track this and add the full stack trace that you have obtained. <br>

<br>Thanks<br><br>Luc<br><br><div class="gmail_quote">On Tue, Sep 25, 2012 at 10:29 AM, mehdi b <span dir="ltr">&lt;<a href="mailto:mehdi_xinu@yahoo.com" target="_blank">mehdi_xinu@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div style="font-size:12pt;font-family:times new roman,new york,times,serif"><div>Hi</div><div><br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">

I have a cube with calculated member called UsedCreditAvg which is defined in Measures dimenstion in the mondrian schema xml file as following</div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">

<br></div><div style="font-size:16px;font-family:times new roman,new york,times,serif;font-style:normal;background-color:transparent"><span style="color:rgb(191,95,0)">    &lt;Cube name=&quot;CardCredit&quot; cache=&quot;false&quot; enabled=&quot;true&quot; defaultMeasure=&quot;UsedCredit&quot;&gt;<br>

        &lt;Table schema=&quot;BIDWH&quot;
 name=&quot;SWT_CB_CRCARD_CREDIT&quot;/&gt;<br><br>        &lt;DimensionUsage name=&quot;Branch&quot; source=&quot;Branch&quot; foreignKey=&quot;FD_BRANCH&quot; /&gt;<br>        &lt;DimensionUsage name=&quot;Date&quot; source=&quot;Date&quot; foreignKey=&quot;FD_DATE&quot; /&gt;<br>

<br>        &lt;Measure name=&quot;DistinctDate&quot; column=&quot;FD_DATE&quot; aggregator=&quot;distinct-count&quot;&gt;</span></div><div style="font-size:16px;font-family:times new roman,new york,times,serif;font-style:normal;background-color:transparent;color:rgb(191,95,0)">

<span style="color:rgb(191,95,0)">             &lt;CalculatedMemberProperty name=&quot;applyEndMarker&quot; value=&quot;false&quot;/&gt;<br></span></div><div style="font-size:16px;font-family:times new roman,new york,times,serif;font-style:normal;background-color:transparent;color:rgb(191,95,0)">

<span style="color:rgb(191,95,0)">        &lt;/Measure&gt;<br></span></div><div style="font-size:16px;font-family:times new roman,new york,times,serif;font-style:normal;background-color:transparent;color:rgb(191,95,0)"><span style="color:rgb(191,95,0)"><br>

</span></div><div style="font-size:16px;font-family:times new roman,new york,times,serif;font-style:normal;background-color:transparent;color:rgb(191,95,0)"><span style="color:rgb(191,95,0)">        &lt;Measure name=&quot;UsedCredit&quot; column=&quot;MR_USD_CREDIT&quot; aggregator=&quot;sum&quot; &gt;<br>

</span></div><div style="font-size:16px;font-family:times new roman,new york,times,serif;font-style:normal;background-color:transparent;color:rgb(191,95,0)"><span style="color:rgb(191,95,0)">             &lt;CalculatedMemberProperty name=&quot;applyEndMarker&quot;
 value=&quot;true&quot;/&gt;<br></span></div><div style="font-size:16px;font-family:times new roman,new york,times,serif;font-style:normal;background-color:transparent;color:rgb(191,95,0)"><span style="color:rgb(191,95,0)">        &lt;/Measure&gt;<br>

</span></div><div style="font-size:16px;font-family:times new roman,new york,times,serif;font-style:normal;background-color:transparent;color:rgb(191,95,0)"><span style="color:rgb(191,95,0)"><br></span></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">

<span style="color:rgb(191,95,0)">        &lt;CalculatedMember name=&quot;UsedCreditAvg&quot; dimension=&quot;Measures&quot;&gt;<br>           
 &lt;Formula&gt;[Measures].[UsedCredit]/[Measures].[DistinctDate]&lt;/Formula&gt;<br></span></div><div style="font-size:16px;font-family:times new roman,new york,times,serif;font-style:normal;background-color:transparent;color:rgb(191,95,0)">

<span style="color:rgb(191,95,0)">             &lt;CalculatedMemberProperty name=&quot;applyEndMarker&quot; value=&quot;false&quot;/&gt;<br></span></div><span style="color:rgb(191,95,0)"></span><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">

<span style="color:rgb(191,95,0)">        &lt;/CalculatedMember&gt;<br>    &lt;/Cube&gt;</span><br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">

<br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">At first, I execute the following MDX:</div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">

<br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif"><span style="color:rgb(0,0,191)">with <br>member [Date].[NewAll] as &#39;iif([Measures].CurrentMember.Properties(&quot;applyEndMarker&quot;)=&quot;false&quot;, [Date].[All], [Date].LastChild.LastChild)&#39;<br>

select NON EMPTY {{[Date].[Month].Members}, [Date].[NewAll]} ON COLUMNS,<br>  {[Measures].[UsedCredit], [Measures].[UsedCreditAvg]} ON ROWS<br>from [CardCredit]</span><br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">

<br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">and I got wrong result for [Measures].[UsedCreditAvg]. Then I tried some other MDX queries, and I finally found that when I execute the following MDX:</div>

<div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif"><br></div><div style="font-size:16px;font-family:times new roman,new york,times,serif;background-color:transparent;font-style:normal">

<span style="color:rgb(0,0,191)">with<br>member [Date].[Testtt] as &#39;[Measures].CurrentMember.Name&#39;<br>select [Date].[Testtt] on axis(0),<br>{[Measures].[UsedCredit], [Measures].[UsedCreditAvg]} ON axis(1)<br>from [CardCredit]<br>

</span></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif"><br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">

for [Measures].[UsedCredit], I got &quot;UsedCredit&quot; value, but for [Measures].[UsedCreditAvg] I got <span style="color:rgb(191,0,95)">&quot;mondrian.olap.fun.MondrianEvaluationException: Expected value of type NUMERIC; got value &#39;UsedCredit&#39; (STRING)&quot;</span>.</div>

<div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif"><br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">

It seems that the CurrentMemeber.Name or CurrentMemeber.Properties() dose not
 work over calculated members.</div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif"><br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">

So is there any solution? Is it a bug? what can I do to solve the problem?</div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif"><br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">

<br></div></div></div><br>_______________________________________________<br>
Mondrian mailing list<br>
<a href="mailto:Mondrian@pentaho.org">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></blockquote></div><br>