<?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 Statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Nested-IF-Statement/m-p/367608#M703003</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to nest an IF statement within another IF statement? So for example for the below... would that be the best way of doing things?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE height="110" style="width: 577px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(Len(NetSalesValue) &amp;gt; 9, 0, NetSalesValue)&amp;nbsp; as [Invoice Value],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(NetSalesValue &amp;lt; 0, NetSalesValue, 0) as [Credit Value],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to still apply the Invoice Value IF to the Credit Value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Jul 2012 14:25:17 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-07-25T14:25:17Z</dc:date>
    <item>
      <title>Nested IF Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-IF-Statement/m-p/367608#M703003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to nest an IF statement within another IF statement? So for example for the below... would that be the best way of doing things?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE height="110" style="width: 577px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(Len(NetSalesValue) &amp;gt; 9, 0, NetSalesValue)&amp;nbsp; as [Invoice Value],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(NetSalesValue &amp;lt; 0, NetSalesValue, 0) as [Credit Value],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to still apply the Invoice Value IF to the Credit Value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2012 14:25:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-IF-Statement/m-p/367608#M703003</guid>
      <dc:creator />
      <dc:date>2012-07-25T14:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: Nested IF Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-IF-Statement/m-p/367609#M703004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lewis, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, that's possible indeed and should work just fine in the script. Check this syntax:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_1343226435349282" jivemacro_uid="_1343226435349282"&gt;&lt;P&gt;If(&lt;/P&gt;&lt;P&gt;&amp;nbsp; If(Len(NetSalesValue) &amp;gt; 9, 0,NetSalesValue) &amp;lt; 0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NetSalesValue, 0) as [Credit Value],&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2012 14:30:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-IF-Statement/m-p/367609#M703004</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2012-07-25T14:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Nested IF Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-IF-Statement/m-p/367610#M703005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the problem you have is that you have called the NetSalesValue twice... try the formula below..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12.222222328186035px; background-color: #eef4f9;"&gt;if(If(Len(NetSalesValue) &amp;gt; 9, 0, NetSalesValue)&amp;lt; 0, NetSalesValue, 0) as [Credit Value],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12.222222328186035px; background-color: #eef4f9;"&gt;Or you could use this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12.222222328186035px; background-color: #eef4f9;"&gt;If(Len(netSalesValue)&amp;gt;9 and NetSalesValue&amp;lt;0, NetSalesValue,0) as [Credit Value],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; background-color: #eef4f9; font-family: Arial;"&gt;I Hope this helps&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; background-color: #eef4f9; font-family: Arial;"&gt;Ali&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2012 14:33:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-IF-Statement/m-p/367610#M703005</guid>
      <dc:creator />
      <dc:date>2012-07-25T14:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: Nested IF Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-IF-Statement/m-p/367611#M703006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again Miguel, thats perfect and works a treat!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2012 15:24:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-IF-Statement/m-p/367611#M703006</guid>
      <dc:creator />
      <dc:date>2012-07-25T15:24:44Z</dc:date>
    </item>
  </channel>
</rss>

