<?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: How do I script this? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-do-I-script-this/m-p/267713#M706700</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe just remove the Sales Deal field from your table load, then do a second load from your source only with field %KEY_VBRP and SalesDeal but using a where clause&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;%KEY_VBRP,&lt;/P&gt;&lt;P&gt;[Sales Deal]&lt;/P&gt;&lt;P&gt;from ... where Condition = 'ZD05';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you have two tables linked by %KEY_VBRP. If you like you could left join the second table back to your first like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left join (FirstTable) LOAD&lt;/P&gt;&lt;P&gt;%KEY_VBRP,&lt;/P&gt;&lt;P&gt;[Sales Deal]&lt;/P&gt;&lt;P&gt;from ... where Condition = 'ZD05';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Feb 2012 15:59:34 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2012-02-09T15:59:34Z</dc:date>
    <item>
      <title>How do I script this?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-script-this/m-p/267712#M706699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Good Morning, &lt;/DIV&gt;&lt;DIV&gt;I have a question on how to do the following in my script.&amp;nbsp; My data looks like this:&lt;/DIV&gt;&lt;DIV&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 304pt; border-collapse: collapse;" width="404"&gt;&lt;TBODY&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="border: 0.5pt solid gainsboro; width: 131pt; height: 12.75pt; background-color: whitesmoke;" width="174"&gt;&lt;STRONG style="color: #333333; font-family: Tahoma;"&gt;%KEY_VBRP&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-width: 0.5pt 0.5pt 0.5pt 0px; border-style: solid solid solid none; border-color: gainsboro gainsboro gainsboro #333333; width: 75pt; background-color: whitesmoke;" width="100"&gt;&lt;STRONG style="color: #333333; font-family: Tahoma;"&gt;Condition&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-width: 0.5pt 0.5pt 0.5pt 0px; border-style: solid solid solid none; border-color: gainsboro gainsboro gainsboro #333333; width: 98pt; background-color: whitesmoke;" width="130"&gt;&lt;STRONG style="color: #333333; font-family: Tahoma;"&gt;Sales Deal&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl66" height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; height: 12.75pt; background-color: white;"&gt;&lt;SPAN style="color: #333333; font-family: Tahoma;"&gt;9311099134/000010&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl66" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;&lt;SPAN style="color: #333333; font-family: Tahoma;"&gt;ZD05&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl66" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;&lt;SPAN style="color: #333333; font-family: Tahoma;"&gt;0000001455&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl66" height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; height: 12.75pt; background-color: white;"&gt;&lt;SPAN style="color: #333333; font-family: Tahoma;"&gt;9311099134/000010&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl66" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;&lt;SPAN style="color: #333333; font-family: Tahoma;"&gt;ZP00&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl66" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;After I load the data, I want to loop back through it and apply the Sales Deal that is associated with the ZDO5 condition to the ZP00 condition.&amp;nbsp; Both conditions have the same Key, %KEY_VBRP.&amp;nbsp; I am loading a lot of records where this will happen, the Condition value ZD05 will always have a Sales Deal #, but the ZP00 will not.&amp;nbsp; This is one example, but my data also has ZD00 conditions that are just like the ZP00 condition where the Sales Deal field is Null but I will need to take the Sales Deal # from the ZD05 value with the same key and apply it to the empty field.&amp;nbsp; Thanks, &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2012 15:46:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-script-this/m-p/267712#M706699</guid>
      <dc:creator />
      <dc:date>2012-02-09T15:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do I script this?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-script-this/m-p/267713#M706700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe just remove the Sales Deal field from your table load, then do a second load from your source only with field %KEY_VBRP and SalesDeal but using a where clause&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;%KEY_VBRP,&lt;/P&gt;&lt;P&gt;[Sales Deal]&lt;/P&gt;&lt;P&gt;from ... where Condition = 'ZD05';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you have two tables linked by %KEY_VBRP. If you like you could left join the second table back to your first like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left join (FirstTable) LOAD&lt;/P&gt;&lt;P&gt;%KEY_VBRP,&lt;/P&gt;&lt;P&gt;[Sales Deal]&lt;/P&gt;&lt;P&gt;from ... where Condition = 'ZD05';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2012 15:59:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-script-this/m-p/267713#M706700</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-02-09T15:59:34Z</dc:date>
    </item>
    <item>
      <title>How do I script this?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-script-this/m-p/267714#M706701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Have a look into the PREVIOUS- or PEEK-function, script might be:&lt;/P&gt;&lt;P&gt;Data_1:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Key,&lt;/P&gt;&lt;P&gt;Cond,&lt;/P&gt;&lt;P&gt;IF(Cond = 'ZP00' AND PREVIOUS(Key) = Key, PREVIOUS(Deal), Deal)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS Deal&lt;/P&gt;&lt;P&gt;RESIDENT&lt;/P&gt;&lt;P&gt;Data&lt;/P&gt;&lt;P&gt;ORDER BY&lt;/P&gt;&lt;P&gt;Key ASC,&lt;/P&gt;&lt;P&gt;Cond ASC;&lt;/P&gt;&lt;P&gt;DROP TABLE Data;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2012 16:02:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-script-this/m-p/267714#M706701</guid>
      <dc:creator>prieper</dc:creator>
      <dc:date>2012-02-09T16:02:54Z</dc:date>
    </item>
  </channel>
</rss>

