Hi Benny and Julian,<div>Many thanks for your help! </div><div>I realized by looking at Benny&#39;s code that I shouldn&#39;t use double quotation marks in the expression, so I changed my expression to:</div><div>Iif(([Measures].[New Subscriptions (Actual VS Budget)]&lt; -0.01),&#39;|#0.00%|style=red|arrow=down&#39;,Iif(([Measures].[New Subscriptions (Actual VS Budget)]&lt; 0.01),&#39;|#0.00%|style=yellow|arrow=blank&#39;,&#39;|#0.00%|style=green|arrow=up&#39;))</div>
<div><br></div><div>I also downloaded the latest version of Schema Workbench which has support for Calculated Member Property.</div><div>Everything is working fine now!</div><div><br></div><div>Thanks a lot,</div><div>Diddy</div>
<div><br></div><div><br></div><div><br><br><div class="gmail_quote">On Wed, Aug 25, 2010 at 2:28 AM, 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="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I agree, CalculatedMemberProperty is a more convenient way to specify it.<br>
<br>
But contrary to what Benny says, the format string is interpreted as an MDX expression. (Of course, that expression can be string literal if you happen to want the same format string for all cells.)<br>
<font color="#888888"><br>
Julian<br>
</font><div class="im"><br>
<br>
&gt; -----Original Message-----<br>
&gt; From: <a href="mailto:mondrian-bounces@pentaho.org">mondrian-bounces@pentaho.org</a><br>
</div><div class="im">&gt; [mailto:<a href="mailto:mondrian-bounces@pentaho.org">mondrian-bounces@pentaho.org</a>] On Behalf Of Benny Chow<br>
&gt; Sent: Tuesday, August 24, 2010 6:19 PM<br>
&gt; To: <a href="mailto:mondrian@pentaho.org">mondrian@pentaho.org</a><br>
</div><div><div></div><div class="h5">&gt; Subject: [Mondrian] RE: Conditional Formatting (Diethard Steiner)<br>
&gt;<br>
&gt;<br>
&gt;   &lt;CalculatedMember name=&quot;Arrow Unit Sales&quot; dimension=&quot;Measures&quot;&gt;<br>
&gt;     &lt;Formula&gt;[Measures].[Unit Sales]&lt;/Formula&gt;<br>
&gt;     &lt;CalculatedMemberProperty name=&quot;FORMAT_STRING&quot;<br>
&gt; expression=&quot;IIf([Measures].[Unit Sales] &gt;<br>
&gt; 10000,&#39;|#,###|arrow=up&#39;,IIf([Measures].[Unit Sales] &gt;<br>
&gt; 5000,&#39;|#,###|arrow=down&#39;,&#39;|#,###|arrow=none&#39;))&quot; /&gt;<br>
&gt;   &lt;/CalculatedMember&gt;<br>
&gt;<br>
&gt; Since you are using an MDX expression to do conditional<br>
&gt; formatting, you should specify the expression via a member<br>
&gt; property as shown above.  I think the formatString is treated<br>
&gt; as a string literal and not actually evaluated as an MDX expression.<br>
&gt;<br>
&gt; Benny<br>
&gt;<br>
&gt; -----Original Message-----<br>
&gt; From: <a href="mailto:mondrian-bounces@pentaho.org">mondrian-bounces@pentaho.org</a><br>
&gt; [mailto:<a href="mailto:mondrian-bounces@pentaho.org">mondrian-bounces@pentaho.org</a>] On Behalf Of<br>
&gt; <a href="mailto:mondrian-request@pentaho.org">mondrian-request@pentaho.org</a><br>
&gt; Sent: Wednesday, August 25, 2010 1:00 AM<br>
&gt; To: <a href="mailto:mondrian@pentaho.org">mondrian@pentaho.org</a><br>
&gt; Subject: Mondrian Digest, Vol 45, Issue 14<br>
&gt;<br>
&gt; Send Mondrian mailing list submissions to<br>
&gt;       <a href="mailto:mondrian@pentaho.org">mondrian@pentaho.org</a><br>
&gt;<br>
&gt; To subscribe or unsubscribe via the World Wide Web, visit<br>
&gt;       <a href="http://lists.pentaho.org/mailman/listinfo/mondrian" target="_blank">http://lists.pentaho.org/mailman/listinfo/mondrian</a><br>
&gt; or, via email, send a message with subject or body &#39;help&#39; to<br>
&gt;       <a href="mailto:mondrian-request@pentaho.org">mondrian-request@pentaho.org</a><br>
&gt;<br>
&gt; You can reach the person managing the list at<br>
&gt;       <a href="mailto:mondrian-owner@pentaho.org">mondrian-owner@pentaho.org</a><br>
&gt;<br>
&gt; When replying, please edit your Subject line so it is more specific<br>
&gt; than &quot;Re: Contents of Mondrian digest...&quot;<br>
&gt;<br>
&gt;<br>
&gt; Today&#39;s Topics:<br>
&gt;<br>
&gt;    1. Re: Mondrian Performance Test Harness (Nicholas Goodman)<br>
&gt;    2. Re: -----SPAM----- Mondrian + Hadoop Hive Research<br>
&gt; (Calum Miller)<br>
&gt;    3. Conditional Formatting (Diethard Steiner)<br>
&gt;<br>
&gt;<br>
&gt; ----------------------------------------------------------------------<br>
&gt;<br>
&gt; Message: 1<br>
&gt; Date: Mon, 23 Aug 2010 12:59:57 -0700<br>
&gt; From: Nicholas Goodman &lt;<a href="mailto:ngoodman@bayontechnologies.com">ngoodman@bayontechnologies.com</a>&gt;<br>
&gt; Subject: Re: [Mondrian] Mondrian Performance Test Harness<br>
&gt; To: Mondrian developer mailing list &lt;<a href="mailto:mondrian@pentaho.org">mondrian@pentaho.org</a>&gt;<br>
&gt; Message-ID:<br>
&gt;       &lt;<a href="mailto:8B758210-9B0F-472A-BD95-D136A4794BEA@bayontechnologies.com">8B758210-9B0F-472A-BD95-D136A4794BEA@bayontechnologies.com</a>&gt;<br>
&gt; Content-Type: text/plain; charset=&quot;windows-1252&quot;<br>
&gt;<br>
&gt;<br>
&gt; On Aug 23, 2010, at 12:37 PM,<br>
&gt; &lt;<a href="mailto:jeff.s.wright@thomsonreuters.com">jeff.s.wright@thomsonreuters.com</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; Good references, I’ve seen those. SSB is a snowflake model<br>
&gt; with a single fact table. I’d prefer to be able to test<br>
&gt; Virtual cubes. I came down on the side of TPC-DS because it<br>
&gt; seemed more meaty as a data model and there was code to<br>
&gt; support it, even if it wasn’t finished or actively used as a<br>
&gt; TPC benchmark.<br>
&gt; SSB is based on a modified TPC-H benchmark.  In general, it<br>
&gt; generates the TPC-H data denormalized.  I&#39;d think that the<br>
&gt; SSB could easily be extended to make a separate Orders fact<br>
&gt; (a level above line items) that should zero balance with<br>
&gt; lineitems but allow for virtual cube testing thru conformed<br>
&gt; dimensions.<br>
&gt;<br>
&gt; &gt;  &gt;A scalable database generator is essential<br>
&gt; &gt;<br>
&gt; &gt; Unfortunately both SSB and TPC-DS use data generators<br>
&gt; written in C, but we may be able to take on porting that to<br>
&gt; Java as scope for this semester or a follow on project.<br>
&gt; I vaguely recall, but just googled and couldn&#39;t find a java<br>
&gt; based version of TPCH from the OSU OSL lab @ sourceforge.<br>
&gt; But, can&#39;t find anything on any search so I might be losing<br>
&gt; some marbles.<br>
&gt;<br>
&gt; LucidDB (and firewater) would LOVE to have a java based<br>
&gt; version of the SSB generator!  In particular, we&#39;d love to be<br>
&gt; able to access the generation via straight java because that<br>
&gt; could allow us to wrap it in Java and load directly from Java<br>
&gt; into LucidDB without generating/persisting intermediate huge files.<br>
&gt;<br>
&gt; If you&#39;re genuinely interested in this, contact me and we can<br>
&gt; discuss if we can also add some guidance/help for your team.<br>
&gt; -------------- next part --------------<br>
&gt; An HTML attachment was scrubbed...<br>
&gt; URL:<br>
&gt; <a href="http://lists.pentaho.org/pipermail/mondrian/attachments/201008
23/a3c14a82/attachment-0001.html" target="_blank">http://lists.pentaho.org/pipermail/mondrian/attachments/201008<br>
23/a3c14a82/attachment-0001.html</a><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Mon, 23 Aug 2010 22:23:13 +0100<br>
From: Calum Miller &lt;<a href="mailto:calum@millersoft.ltd.uk">calum@millersoft.ltd.uk</a>&gt;<br>
Subject: [Mondrian] Re: -----SPAM----- Mondrian + Hadoop Hive Research<br>
To: Jordan Ganoff &lt;<a href="mailto:jganoff@pentaho.com">jganoff@pentaho.com</a>&gt;<br>
Cc: &quot;<a href="mailto:mondrian@pentaho.org">mondrian@pentaho.org</a>&quot; &lt;<a href="mailto:mondrian@pentaho.org">mondrian@pentaho.org</a>&gt;<br>
Message-ID: &lt;<a href="mailto:1F7DDBAF-BB1D-49DE-BFBC-9BA28F2AD725@millersoft.ltd.uk">1F7DDBAF-BB1D-49DE-BFBC-9BA28F2AD725@millersoft.ltd.uk</a>&gt;<br>
Content-Type: text/plain; charset=&quot;utf-8&quot;<br>
<br>
Hi Jordan,<br>
<br>
Many thanks for the feedback, which confirms my suspicions that a Hive Dialect for Mondrian is at least possible. I&#39;m going to start by getting foodmart into hadoop to support the Mondrian test  suite via hive then progress onto the necessary changes to the Sql join statement.  I&#39;ll post updates to the specified jira.<br>

<br>
Calum<br>
<br>
<br>
On 23 Aug 2010, at 16:30, Jordan Ganoff &lt;<a href="mailto:jganoff@pentaho.com">jganoff@pentaho.com</a>&gt; wrote:<br>
<br>
&gt; Calum,<br>
&gt;<br>
&gt; The PDI team recently did some research for using Apache&#39;s Hive database with Mondrian.  You tweeted &quot;Thinking of adding Hive dialect to Mondrian, too slow for add-hoc queries but would enable mdx reports against hadoop&quot; on 11:21 AM Aug 22nd. This is an effort to give you a bit of heads up to some of the issues you&#39;ll encounter and the JIRA case with patches to Mondrian to get Hive working at a remedial level.  Research done by James Dixon, Sean Flatley and myself found the following issues when integrating Hive with Mondrian 3.1.6.13364.  We used our custom built Hive JDBC Driver[1] for testing:<br>

&gt;<br>
&gt; - Prepared Statements are mostly unimplemented in the JDBC driver from Apache in versions 0.5.0 and trunk (0.7.0).  We are working on implementing more functionality as needed to get Report Designer and Metadata Editor working well.  Our changes are being contributed back to the official Hive project but until they are accepted we&#39;re building our own version[1][2].<br>

&gt;<br>
&gt; - Join syntax generated by Mondrian is not compatible with Hive.  In short, Hive does not support multiple items in the from clause.[2]<br>
&gt;<br>
&gt; See the related JIRA case with attached patches to get Mondrian 3.1.6.13364 to work with Hive and associated test results: <a href="http://jira.pentaho.com/browse/PDI-4355" target="_blank">http://jira.pentaho.com/browse/PDI-4355</a><br>

&gt;<br>
&gt; [1]: <a href="http://ci.pentaho.com/view/Data%20Integration/job/apache-hive-0.5.0/" target="_blank">http://ci.pentaho.com/view/Data%20Integration/job/apache-hive-0.5.0/</a><br>
&gt; [2]: <a href="http://forums.pentaho.com/showthread.php?77826-Hive-amp-Hadoop" target="_blank">http://forums.pentaho.com/showthread.php?77826-Hive-amp-Hadoop</a><br>
&gt; [3]: <a href="http://wiki.apache.org/hadoop/Hive/LanguageManual/Joins" target="_blank">http://wiki.apache.org/hadoop/Hive/LanguageManual/Joins</a><br>
&gt;<br>
&gt; Hope this helps,<br>
&gt;<br>
&gt; Jordan Ganoff<br>
&gt; Software Engineer<br>
&gt; &lt;pentaho-email-logo.gif&gt;<br>
&gt; Pentaho: The Commercial Open Source Alternative for Business Intelligence<br>
&gt; 5950 Hazeltine National Drive, Suite 340 â€¢ Orlando, FL 32822, USA<br>
&gt; +1 407 812-OPEN (6736) â€¢ 407 517-6206 â€¢ 321 848-8207<br>
&gt; Get your free download today at <a href="http://www.pentaho.com" target="_blank">http://www.pentaho.com</a>.<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.pentaho.org/pipermail/mondrian/attachments/20100823/931035df/attachment-0001.html" target="_blank">http://lists.pentaho.org/pipermail/mondrian/attachments/20100823/931035df/attachment-0001.html</a><br>

<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Tue, 24 Aug 2010 11:28:59 +0100<br>
From: Diethard Steiner &lt;<a href="mailto:diethard.steiner@gmail.com">diethard.steiner@gmail.com</a>&gt;<br>
Subject: [Mondrian] Conditional Formatting<br>
To: <a href="mailto:mondrian@pentaho.org">mondrian@pentaho.org</a><br>
Message-ID:<br>
        &lt;<a href="mailto:AANLkTim5Tu9D2bbrKHYMEJqNibZNOEj-ihH1E-7whDF9@mail.gmail.com">AANLkTim5Tu9D2bbrKHYMEJqNibZNOEj-ihH1E-7whDF9@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
Hi,<br>
I created some calculated members and want to apply conditional formatting.<br>
To test my formatting, I wrote an MDX query and created a member with the<br>
formatting string and all worked fine.<br>
In Schema Workbench, I apply the formatString to the calculated member ...<br>
and then when I check the results in JPivot online, I can see the<br>
formatString instead of the values (but period signs etc is missing). I<br>
opened the XML schema file in an editor and saw that workbench URL encodes<br>
the formatstring.<br>
<br>
If I just use a simple format like #0.00% all works fine. So I am wondering<br>
as to why the iif statement is not working. What exactly am I doing wrong?<br>
<br>
Here the code:<br>
Iif(([Measures].[Index Revenues]&lt;<br>
-0.01),&quot;|#0.00%|style=&#39;red&#39;|arrow=&#39;down&#39;&quot;,Iif(([Measures].[Index Revenues]&lt;<br>
0.01),&quot;|#0.00%|style=&#39;yellow&#39;|arrow=&#39;blank&#39;&quot;,&quot;|#0.00%|style=&#39;green&#39;|arrow=&#39;up&#39;&quot;))<br>
<br>
Looks like this in the Schema:<br>
&lt;CalculatedMember name=&quot;Index Revenues&quot; formatString=&quot;Iif(([Measures].[Index<br>
Revenues]&amp;#60;<br>
-0.01),&amp;#34;|#0.00%|style=&amp;#39;red&amp;#39;|arrow=&amp;#39;down&amp;#39;&amp;#34;,Iif(([Measures].[Index<br>
Revenues]&amp;#60;<br>
0.01),&amp;#34;|#0.00%|style=&amp;#39;yellow&amp;#39;|arrow=&amp;#39;blank&amp;#39;&amp;#34;,&amp;#34;|#0.00%|style=&amp;#39;green&amp;#39;|arrow=&amp;#39;up&amp;#39;&amp;#34;))&quot;<br>
formula=&quot;IIF([Date.Weekly Calendar].CurrentMember Is<br>
Null,Null,([Measures].[act_revenues]-[Measures].[bdgt_revenues])/(Iif([Measures].[bdgt_revenues]&amp;#60;0,[Measures].[bdgt_revenues]*-1,[Measures].[bdgt_revenues])))&quot;<br>
dimension=&quot;Measures&quot; visible=&quot;true&quot;&gt;<br>
&lt;/CalculatedMember&gt;<br>
<br>
Thanks,<br>
Diddy<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.pentaho.org/pipermail/mondrian/attachments/20100824/610f6e5d/attachment-0001.html" target="_blank">http://lists.pentaho.org/pipermail/mondrian/attachments/20100824/610f6e5d/attachment-0001.html</a><br>

<br>
------------------------------<br>
<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>
<br>
End of Mondrian Digest, Vol 45, Issue 14<br>
****************************************<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>
_______________________________________________<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>
</div></div></blockquote></div><br></div>