<HTML>
<HEAD>
<TITLE>Re: [Mondrian] CurrentDateMember</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>In db, I have 1 thru 12 for months. Using jpivot w/o CurrentDateMember with drilldown to month level would generate something like this: [Time].[All Times].[2006].[May].<BR>
<BR>
Per VB reference, <a href="http://www.apostate.com/vb-format-syntax">http://www.apostate.com/vb-format-syntax</a>, where it shows MMM to display the month as abbrev (Jan &#8211; Dec), I tried MMM and got no results. Using mmm however got me the results. It was an accident that I typed in mmm and got the results. LoL. <BR>
<BR>
Does it mean that the Mondarian is expecting mmm, not MMM? <BR>
<BR>
As for using dimension names, I did try the following but it did not work unless I remove dimension name.<BR>
<BR>
No results pulled:<BR>
{(CurrentDateMember([Time], &quot;['Time']\.[yyyy]\.[mmm]&quot;).Lag(13.0) : CurrentDateMember([Time], &quot;['Time']\.[yyyy]\.[mmm]&quot;).Lag(1.0))} ON ROWS<BR>
<BR>
Results pulled:<BR>
{(CurrentDateMember([Time], &quot;[yyyy]\.[mmm]&quot;).Lag(13.0) : CurrentDateMember([Time], &quot;[yyyy]\.[mmm]&quot;).Lag(1.0))} ON ROWS <BR>
<BR>
PS: Am using biserver_ce 2.0.x<BR>
<BR>
On 10/1/08 7:53 PM, &quot;Julian Hyde&quot; &lt;<a href="jhyde@pentaho.com">jhyde@pentaho.com</a>&gt; wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><SPAN STYLE='font-size:11pt'><FONT COLOR="#000080"><FONT FACE="Verdana, Helvetica, Arial">I think the example had extra '\'s because it was taken from Java code (inside java strings, &quot; and \ need to be escaped). That's why it worked for you to change '\\.' to '\.'.<BR>
</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT COLOR="#000080"><FONT FACE="Verdana, Helvetica, Arial">If you had changed '\&quot;Time\&quot;' to '&quot;Time&quot;' it would probably have worked too. It worked without Time because dimension names are optional - although I recommend using dimension names, because it makes your code clearer and reduces the amount of searching mondrian has to do.<BR>
</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT COLOR="#000080"><FONT FACE="Verdana, Helvetica, Arial">I also see that you changed MMM to mmm. I'm guessing that in your dimension months look like 'jan' rather than 'JAN'.<BR>
</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT COLOR="#000080"><FONT FACE="Verdana, Helvetica, Arial">Thanks for letting us know what works.<BR>
</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT COLOR="#000080"><FONT FACE="Verdana, Helvetica, Arial">Julian<BR>
</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><BR>
</FONT></SPAN><BLOCKQUOTE><SPAN STYLE='font-size:11pt'><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
&nbsp;<BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="100%"> </FONT><FONT FACE="Tahoma, Verdana, Helvetica, Arial"><B>From:</B> <a href="mondrian-bounces@pentaho.org">mondrian-bounces@pentaho.org</a> &nbsp;[<a href="mailto:mondrian-bounces@pentaho.org">mailto:mondrian-bounces@pentaho.org</a>] <B>On Behalf Of </B>Shaffner &nbsp;Joshua<BR>
<B>Sent:</B> Wednesday, October 01, 2008 3:29 PM<BR>
<B>To:</B> &nbsp;Mondrian developer mailing list<BR>
<B>Subject:</B> Re: [Mondrian] &nbsp;CurrentDateMember<BR>
</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><BR>
&nbsp;<BR>
Finally got this working..<BR>
<BR>
Interesting that it &nbsp;works without [\&#8221;Time\&#8221;]?<BR>
<BR>
CurrentDateMember([Time], &nbsp;'[yyyy]\.[mmm]').Lag(12) :<BR>
CurrentDateMember([Time], &nbsp;'[yyyy]\.[mmm]')<BR>
<BR>
<BR>
On 10/1/08 6:16 PM, &quot;Joshua Shaffner&quot; &lt;<a href="joshua.shaffner@goodwill.org">joshua.shaffner@goodwill.org</a>&gt; &nbsp;wrote:<BR>
<BR>
&nbsp;<BR>
</FONT></SPAN><BLOCKQUOTE><SPAN STYLE='font-size:11pt'><FONT FACE="Calibri, Verdana, Helvetica, Arial">Per a couple suggestions in IRC as well as Julian&#8217;s &nbsp;blog ( <a href="http://julianhyde.blogspot.com/2006/10/mondrian-22-cube-designer-and.html">http://julianhyde.blogspot.com/2006/10/mondrian-22-cube-designer-and.html</a>), &nbsp;I tried the query below but to no luck. I either get no results or internal &nbsp;error. If you see something, let me know. I am stumped...after trying this &nbsp;and that for a couple hours over just a couple of lines.<BR>
<BR>
SELECT NON &nbsp;EMPTY {[Measures].[Retail Store Sales], &lt;truncated&gt;} ON &nbsp;COLUMNS,<BR>
<BR>
NON EMPTY <BR>
{<BR>
CurrentDateMember([Time], &nbsp;'[\&quot;Time\&quot;]\\.[yyyy]\\.[MMM]').Lag(12) :<BR>
CurrentDateMember([Time], &nbsp;'[\&quot;Time\&quot;]\\.[yyyy]\\.[MMM]')<BR>
}<BR>
ON ROWS<BR>
<BR>
from [MRSDS]<BR>
where &nbsp;[Organization].[All Organizations].[&lt;truncated&gt;]<BR>
<BR>
<BR>
PS: I have &nbsp;Time Hierarchy with two levels, year and month.<BR>
<BR>
&nbsp;<BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="95%"> </FONT></SPAN><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'>_______________________________________________<BR>
Mondrian &nbsp;mailing list<BR>
<a href="Mondrian@pentaho.org">Mondrian@pentaho.org</a><BR>
<a href="http://lists.pentaho.org/mailman/listinfo/mondrian">http://lists.pentaho.org/mailman/listinfo/mondrian</a><BR>
</SPAN></FONT></FONT></BLOCKQUOTE></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="95%"></SPAN></FONT><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'>_______________________________________________<BR>
Mondrian mailing list<BR>
<a href="Mondrian@pentaho.org">Mondrian@pentaho.org</a><BR>
<a href="http://lists.pentaho.org/mailman/listinfo/mondrian">http://lists.pentaho.org/mailman/listinfo/mondrian</a><BR>
</SPAN></FONT></FONT></BLOCKQUOTE>
</BODY>
</HTML>