<?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: Problems with if statement in load script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problems-with-if-statement-in-load-script/m-p/1409405#M426411</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks a lot for the Help. SOmetimes you just don´t see the tree even though you are in the forest &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Aug 2017 14:05:53 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-08-16T14:05:53Z</dc:date>
    <item>
      <title>Problems with if statement in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-if-statement-in-load-script/m-p/1409402#M426408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;due to Performance reasons I am trying to move some expressions into the load script. Somehow I always encounter issues with the if Statement. In my qvw file I use the following Set Analysis Expresssion which works perfectly fine:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;SPAN style="color: #575757;"&gt;r&lt;/SPAN&gt;ound&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( {$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ProductionKey&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'Prod'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ProductionQty&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ProductionSegmentID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),0.01) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;now I am trying to do the same in the load script with an if Statement: &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;Load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;ProductionSegmentID,&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;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ProductionKey&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 'Prod',&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;round&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&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: #800000; font-size: 8pt;"&gt;ProductionQty&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),0.01)) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ProductionSegmentQuantity &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;resident Data Group by ProductionSegmentID;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Any ideas what I´m doing wrong would be highly appreciated. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Stefan&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2017 09:21:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-if-statement-in-load-script/m-p/1409402#M426408</guid>
      <dc:creator />
      <dc:date>2017-08-16T09:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with if statement in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-if-statement-in-load-script/m-p/1409403#M426409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD ProductionSegmentID,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Round(Sum(&lt;SPAN style="color: #ff0000;"&gt;If(ProductionKey = 'Prod', ProductionQty)&lt;/SPAN&gt;),0.01) as ProductionSegmentQuantity&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Data&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Group by ProductionSegmentID;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2017 13:39:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-if-statement-in-load-script/m-p/1409403#M426409</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-08-16T13:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with if statement in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-if-statement-in-load-script/m-p/1409404#M426410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A different approach might be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;ProductionSegmentID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;round&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&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: #800000; font-size: 8pt;"&gt;ProductionQty&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),0.01) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ProductionSegmentQuantity &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;resident Data &lt;STRONG&gt;where &lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG style="color: #800000; font-size: 8pt;"&gt;ProductionKey&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt; = 'Prod'&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;Group by ProductionSegmentID;&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, 16 Aug 2017 13:52:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-if-statement-in-load-script/m-p/1409404#M426410</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-08-16T13:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with if statement in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-if-statement-in-load-script/m-p/1409405#M426411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks a lot for the Help. SOmetimes you just don´t see the tree even though you are in the forest &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2017 14:05:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-if-statement-in-load-script/m-p/1409405#M426411</guid>
      <dc:creator />
      <dc:date>2017-08-16T14:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with if statement in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-if-statement-in-load-script/m-p/1409406#M426412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for the Input. The Where Statement won´t work in this case, because some rows which I also Need in the table are not flagged as ProductionKey = Prod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2017 14:07:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-if-statement-in-load-script/m-p/1409406#M426412</guid>
      <dc:creator />
      <dc:date>2017-08-16T14:07:53Z</dc:date>
    </item>
  </channel>
</rss>

