<?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 Re: sum with nested if in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/sum-with-nested-if/m-p/982319#M952891</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The second IF is tested if the first IF is true. I think you need to review your logic.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2015 14:21:26 GMT</pubDate>
    <dc:creator>roger_stone</dc:creator>
    <dc:date>2015-11-25T14:21:26Z</dc:date>
    <item>
      <title>sum with nested if</title>
      <link>https://community.qlik.com/t5/QlikView/sum-with-nested-if/m-p/982317#M952889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Hi ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;I have below script in my expression&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;when i have one row code like ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(((&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TotalCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=86 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PortID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=1153) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TotalCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=88 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PortID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=1153) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TotalCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=87 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PortID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=1153)) ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Bedehkar&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Bestankar&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)/1000000)&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;it's work fine But &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;when i have 2 row code like ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(((&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TotalCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=86 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PortID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=1153) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TotalCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=88 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PortID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=1153) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TotalCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=87 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PortID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=1153)),&amp;nbsp; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(((&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TotalCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=86 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PortID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=3304) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TotalCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=88 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PortID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=3304) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TotalCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=87 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PortID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=3304)),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Bedehkar&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Bestankar&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)/1000000)) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;it's not work and receive me 0.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;i want my script work with multi row code .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;can anyone help me &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;hamide&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2015 13:04:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-with-nested-if/m-p/982317#M952889</guid>
      <dc:creator />
      <dc:date>2015-11-25T13:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: sum with nested if</title>
      <link>https://community.qlik.com/t5/QlikView/sum-with-nested-if/m-p/982318#M952890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you share an example? It is hard to understand what your requirement is just by looking at the code&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2015 14:16:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-with-nested-if/m-p/982318#M952890</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-11-25T14:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: sum with nested if</title>
      <link>https://community.qlik.com/t5/QlikView/sum-with-nested-if/m-p/982319#M952891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The second IF is tested if the first IF is true. I think you need to review your logic.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2015 14:21:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-with-nested-if/m-p/982319#M952891</guid>
      <dc:creator>roger_stone</dc:creator>
      <dc:date>2015-11-25T14:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: sum with nested if</title>
      <link>https://community.qlik.com/t5/QlikView/sum-with-nested-if/m-p/982320#M952892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;match(&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TotalCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, 86,87,88) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; match(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PortID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, 1153,3304)&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,[&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Bedehkar&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Bestankar]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)/1000000)) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2015 14:26:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-with-nested-if/m-p/982320#M952892</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-11-25T14:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: sum with nested if</title>
      <link>https://community.qlik.com/t5/QlikView/sum-with-nested-if/m-p/982321#M952893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yer more details would be helpful. even if you explain what you want in English?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems at the moment you are saying&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If statement 1 is true,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Check that statement 2 is also true, then sum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From look at that the logic it would be zero as your first statement returns values matching&lt;/P&gt;&lt;P&gt;(TotalCode=86 AND PortID=1153) or (TotalCode=88 AND PortID=1153) or (TotalCode=87 AND PortID=1153)&lt;/P&gt;&lt;P&gt;So they can't then also match &lt;/P&gt;&lt;P&gt;(TotalCode=86 AND PortID=3304) or (TotalCode=88 AND PortID=3304) or (TotalCode=87 AND PortID=3304)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe something like&lt;/P&gt;&lt;P&gt;Sum(if((TotalCode=86 AND PortID=1153) or (TotalCode=88 AND PortID=1153) or (TotalCode=87 AND PortID=1153),&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Bedehkar-Bestankar/1000000,&lt;/P&gt;&lt;P&gt;&amp;nbsp; if((TotalCode=86 AND PortID=3304) or (TotalCode=88 AND PortID=3304) or (TotalCode=87 AND PortID=3304),&lt;/P&gt;&lt;P&gt;&amp;nbsp; Bedehkar-Bestankar)/1000000))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(if((TotalCode=86 AND PortID=1153) or (TotalCode=88 AND PortID=1153) or (TotalCode=87 AND PortID=1153) or (TotalCode=86 AND PortID=3304) or (TotalCode=88 AND PortID=3304) or (TotalCode=87 AND PortID=3304),&lt;/P&gt;&lt;P&gt;&amp;nbsp; Bedehkar-Bestankar/1000000)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2015 14:39:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-with-nested-if/m-p/982321#M952893</guid>
      <dc:creator>Mark_Little</dc:creator>
      <dc:date>2015-11-25T14:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: sum with nested if</title>
      <link>https://community.qlik.com/t5/QlikView/sum-with-nested-if/m-p/982322#M952895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ur 2'nd if condition is wrong,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use &lt;STRONG style="font-size: 11.7px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://community.qlik.com/people/Marcus_Sommer"&gt;Marcus_Sommer&lt;/A&gt;&lt;/STRONG&gt; suggestion,tht helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2015 15:57:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-with-nested-if/m-p/982322#M952895</guid>
      <dc:creator>buzzy996</dc:creator>
      <dc:date>2015-11-25T15:57:24Z</dc:date>
    </item>
  </channel>
</rss>

