[Mondrian] Conditional Formatting

Diethard Steiner diethard.steiner at gmail.com
Tue Aug 24 06:28:59 EDT 2010


Hi,
I created some calculated members and want to apply conditional formatting.
To test my formatting, I wrote an MDX query and created a member with the
formatting string and all worked fine.
In Schema Workbench, I apply the formatString to the calculated member ...
and then when I check the results in JPivot online, I can see the
formatString instead of the values (but period signs etc is missing). I
opened the XML schema file in an editor and saw that workbench URL encodes
the formatstring.

If I just use a simple format like #0.00% all works fine. So I am wondering
as to why the iif statement is not working. What exactly am I doing wrong?

Here the code:
Iif(([Measures].[Index Revenues]<
-0.01),"|#0.00%|style='red'|arrow='down'",Iif(([Measures].[Index Revenues]<
0.01),"|#0.00%|style='yellow'|arrow='blank'","|#0.00%|style='green'|arrow='up'"))

Looks like this in the Schema:
<CalculatedMember name="Index Revenues" formatString="Iif(([Measures].[Index
Revenues]&#60;
-0.01),&#34;|#0.00%|style=&#39;red&#39;|arrow=&#39;down&#39;&#34;,Iif(([Measures].[Index
Revenues]&#60;
0.01),&#34;|#0.00%|style=&#39;yellow&#39;|arrow=&#39;blank&#39;&#34;,&#34;|#0.00%|style=&#39;green&#39;|arrow=&#39;up&#39;&#34;))"
formula="IIF([Date.Weekly Calendar].CurrentMember Is
Null,Null,([Measures].[act_revenues]-[Measures].[bdgt_revenues])/(Iif([Measures].[bdgt_revenues]&#60;0,[Measures].[bdgt_revenues]*-1,[Measures].[bdgt_revenues])))"
dimension="Measures" visible="true">
</CalculatedMember>

Thanks,
Diddy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100824/610f6e5d/attachment.html 


More information about the Mondrian mailing list