<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Nested If on Expression to set Text Color in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Nested-If-on-Expression-to-set-Text-Color/m-p/444695#M485584</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi everyone - I'm a brand new QlikView user and am struggling to get a nested IF statement to work.&amp;nbsp; I'm trying to set the expression text color based on an IF statement and will need a few nested together to accomplish this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, the following works fine for one criteria:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;IF(Sum({$&amp;lt;CAP_OM=('Capital'),Craftline_Desc={'Dispatch'}&amp;gt;}Current_Actuals/&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;((Sum({$&amp;lt;CAP_OM=('Capital'),Craftline_Desc={'Dispatch'&amp;gt;}Current_Actuals+Sum($&amp;lt;CAP_OM=('O&amp;amp;M'),Craftline_Desc={'Dispatch'}&amp;gt;}Current_Actuals))&amp;gt;0.20,LightGreen())&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I try to nest another IF after LightGreen (using the same IFstatement, just changing Craftline_Desc = Engineering) the statement is invalid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So Dispatch may be measured against &amp;gt; 0.20, Engineering 0.50, etc etc.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any tips?&amp;nbsp; There is probably a better way to accomplish this so I'm open to suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Apr 2013 14:16:18 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-04-11T14:16:18Z</dc:date>
    <item>
      <title>Nested If on Expression to set Text Color</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-If-on-Expression-to-set-Text-Color/m-p/444695#M485584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi everyone - I'm a brand new QlikView user and am struggling to get a nested IF statement to work.&amp;nbsp; I'm trying to set the expression text color based on an IF statement and will need a few nested together to accomplish this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, the following works fine for one criteria:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;IF(Sum({$&amp;lt;CAP_OM=('Capital'),Craftline_Desc={'Dispatch'}&amp;gt;}Current_Actuals/&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;((Sum({$&amp;lt;CAP_OM=('Capital'),Craftline_Desc={'Dispatch'&amp;gt;}Current_Actuals+Sum($&amp;lt;CAP_OM=('O&amp;amp;M'),Craftline_Desc={'Dispatch'}&amp;gt;}Current_Actuals))&amp;gt;0.20,LightGreen())&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I try to nest another IF after LightGreen (using the same IFstatement, just changing Craftline_Desc = Engineering) the statement is invalid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So Dispatch may be measured against &amp;gt; 0.20, Engineering 0.50, etc etc.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any tips?&amp;nbsp; There is probably a better way to accomplish this so I'm open to suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 14:16:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-If-on-Expression-to-set-Text-Color/m-p/444695#M485584</guid>
      <dc:creator />
      <dc:date>2013-04-11T14:16:18Z</dc:date>
    </item>
  </channel>
</rss>

