Hitachi Vantara Pentaho Community Forums
Results 1 to 7 of 7

Thread: Conditional Formattiong

  1. #1
    Join Date
    Mar 2009
    Posts
    13

    Default Conditional Formatting

    Hi all,

    In Schema Workbench ,I Used the below expression in the formatstring under the calculated member.
    Iif(([Measures].[Sales Amount]/[Measures].[Internet Order Count])>40,'|$#,##0.00|style=red','|$#,##0.00|style=green'

    But while viewing the cube i am getting same thing as shown below

    Iif(([Measures].[Sales Amount]/[Measures].[Internet Order Count])>40,'|$#,##0.00|style=red','|$#,##0.00|style=green'


    It is not formatting the cell

    Please guide me to solve this issue
    Thanks
    Mohideen
    Last edited by mohideen.k; 03-27-2009 at 02:07 PM.

  2. #2
    pstoellberger Guest

    Default

    Don't know if the forum cut anything but my format string looks like:

    Iif(([Measures].[Sales Amount]/[Measures].[Internet Order Count])>40,"|$#,##0.00|style='red'","|$#,##0.00|style='green'")

    So:
    1. use " " for the format string
    2. use ' ' for the green/red thing
    3. a closing ) for the IIf

  3. #3
    Join Date
    Mar 2009
    Posts
    13

    Default Conditional Formatting still exsits

    Hi pstoellberger,

    Thanks for your quick reply,..

    I am still facing same problem.you can see my blog to view the image of output in my BI server and also Schema workbench input for format string

    http://ptplmondrian.blogspot.com/200...ormatting.html

    Expecting Reply.
    Thanks
    Mohideen
    Last edited by mohideen.k; 03-27-2009 at 02:06 PM.

  4. #4
    Join Date
    Oct 2006
    Posts
    219

    Default

    If you define this in the mondrian schema then you have to replace certain characters like > and < with &lt; and &gt; ect.

    Check my sample line below:

    <CalculatedMemberProperty name="FORMAT_STRING" expression="IIf(([Measures].[Unit Sales] &lt; ([Measures].[Unit Sales], [Time].PrevMember)), '|#,###|arrow=down', '|#,###|arrow=up')"/>

    Hope that helps, Haza
    www.ivy-is.co.uk - Ivy Information Systems

    Come join the non official Pentaho IRC chat room on irc.freenode.net in the ##pentaho channel

  5. #5
    Join Date
    Mar 2009
    Posts
    13

    Default Conditional Formatting problem still exsits

    Hi hazamonzo,

    Thanks for your response...
    I have modified the '>' symbol to &lt;
    But I am still facing the problem..
    My output in the browser is
    if(([Measures]486[Sales Amount]&lt




    Now formatstring looks like below in Schema Workbench

    Iif(([Measures].[Sales Amount]&lt;40,"|#,###|style='red'","|#,###|style='green'")

    If i open schema xml file in notepad .I have a formatstring looks like below for calcualted member.

    <CalculatedMember name="Internet Average Sales Amount" formatString="Iif(([Measures].[Sales Amount]&lt;40,"|#,###|style='red'","|#,###|style='green'")" formula="[Measures].[Sales Amount]/[Measures].[Internet Order Count]" dimension="Measures" visible="true">
    </CalculatedMember>

    Is there any mistake in it.

    Expecting Reply,
    Thanks
    Mohideen
    Last edited by mohideen.k; 03-30-2009 at 03:07 AM.

  6. #6
    Join Date
    May 2009
    Posts
    9

    Default

    Hi,

    Any solution for this problem?

  7. #7
    Join Date
    Dec 2011
    Posts
    9

    Default

    In case using conditional format_string, one have to specify Format_String as calculated property of you CM, and not in 'format_string' field of calculated member.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.