<?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: Qlikview Script ignores condition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Qlikview-Script-ignores-condition/m-p/552221#M690983</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe there is an excluding situation between "previous" and ORDER BY.&lt;/P&gt;&lt;P&gt;Remenber that PREVIOUS operates on the INPUT and PEEK on the OUTPUT.&lt;/P&gt;&lt;P&gt;So what&amp;nbsp; if [KeyPart] field is not sorted ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 31 Aug 2013 00:27:15 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-08-31T00:27:15Z</dc:date>
    <item>
      <title>Qlikview Script ignores condition</title>
      <link>https://community.qlik.com/t5/QlikView/Qlikview-Script-ignores-condition/m-p/552220#M690982</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;I have the following table:&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13778474791839752" jivemacro_uid="_13778474791839752" modifiedtitle="true"&gt;
&lt;P&gt;[PartCostsCalulation2]:&lt;/P&gt;
&lt;P&gt;NoConcatenate LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp; [KeyPart],&lt;/P&gt;
&lt;P&gt;&amp;nbsp; [CostDate],&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if(isNull([TotalCostsEndOfMonth]),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if([KeyPart]=previous([KeyPart]), &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Peek([&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;TotalCostsEndOfMonth&lt;/SPAN&gt;]), 0),[&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;TotalCostsEndOfMonth&lt;/SPAN&gt;]) as [&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;TotalCostsEndOfMonth&lt;/SPAN&gt;],&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; [EndOfMonthStockCalculation]&lt;/P&gt;
&lt;P&gt;Resident [PartCostsCalculation1]&lt;/P&gt;
&lt;P&gt;ORDER BY [KeyPart], [CostDate] ASC;&lt;/P&gt;
&lt;P&gt;DROP TABLE [PartCostsCalculation1];&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result should only peek the costs of the previous month if the [KeyPart] (article name) equals the previous record right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well, thats not the case. In the resulting table the record just copies the TotalCostsEndOfMonth of the previous KeyPart, even if this KeyPart is different.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Aug 2013 07:28:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Qlikview-Script-ignores-condition/m-p/552220#M690982</guid>
      <dc:creator />
      <dc:date>2013-08-30T07:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Qlikview Script ignores condition</title>
      <link>https://community.qlik.com/t5/QlikView/Qlikview-Script-ignores-condition/m-p/552221#M690983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe there is an excluding situation between "previous" and ORDER BY.&lt;/P&gt;&lt;P&gt;Remenber that PREVIOUS operates on the INPUT and PEEK on the OUTPUT.&lt;/P&gt;&lt;P&gt;So what&amp;nbsp; if [KeyPart] field is not sorted ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Aug 2013 00:27:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Qlikview-Script-ignores-condition/m-p/552221#M690983</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-31T00:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: Qlikview Script ignores condition</title>
      <link>https://community.qlik.com/t5/QlikView/Qlikview-Script-ignores-condition/m-p/552222#M690984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One possiblility is that the condition isNull([TotalCostsEndOfMonth]) isn't kicking in, since there values are blank strings and not NULL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try Len(Trim([TotalCostsEndOfMonth]))=0 instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See more on &lt;A href="https://community.qlik.com/docs/DOC-3155"&gt;NULL handling in QlikView&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Aug 2013 08:08:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Qlikview-Script-ignores-condition/m-p/552222#M690984</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2013-08-31T08:08:50Z</dc:date>
    </item>
  </channel>
</rss>

