<?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: Exists Condition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Exists-Condition/m-p/648999#M672737</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;My understanding is that you want to populate a dummy record for a key combination that exists in the stock table, but not in the sales table. To do this, add a SalesKey (which exists only in the Sales table) and use this for the Exists. The final load should be from the Stock source or the STOCK resident table as this data does not exist in the Sales source:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SALES:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; CODE as SalesCode, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; CATEGORY as SalesCategory, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; COMPANY as SalesCompany, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; WEIGHT as SalesWeight,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; COMPANY&amp;amp;'-'&amp;amp;CATEGORY&amp;amp;'-'&amp;amp;CODE as Key,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &lt;STRONG&gt;COMPANY&amp;amp;'-'&amp;amp;CATEGORY&amp;amp;'-'&amp;amp;CODE as SalesKey&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;C&gt;&lt;/C&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(ooxml, embedded labels, table is SALES);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Concatenate(SALES)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD Distinct &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; StockCode As SalesCode, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; StockCategory As SalesCategory, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; StockCompany as SalesCompany, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; 0 as SalesWeight,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; StockCompany&amp;amp;'-'&amp;amp;StockCategory&amp;amp;'-'&amp;amp;StockCode as Key&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident &lt;STRONG&gt;STOCK&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Where Not Exists(SalesKey, StockCompany&amp;amp;'-'&amp;amp;StockCategory&amp;amp;'-'&amp;amp;StockCode);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP Field SalesKey; // not needed any more&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Aug 2014 07:36:41 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2014-08-26T07:36:41Z</dc:date>
    <item>
      <title>Exists Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Exists-Condition/m-p/648998#M672736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have confusion while bringing the Exists Condition in my script.&lt;/P&gt;&lt;P&gt;My script contains both Sales and Stock Data.&lt;/P&gt;&lt;P&gt; Stock contains 6 records and in Sales 5 records.&lt;/P&gt;&lt;P&gt;So I have to create a dummy records(6th record) in Sales and should consider weight as zero for that dummy record.&lt;/P&gt;&lt;P&gt;I created the script, but somewhere wrong in Exists Condition.&lt;/P&gt;&lt;P&gt;So Kindly help me to solve this issue. Please find the attachment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sivasu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Aug 2014 07:11:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exists-Condition/m-p/648998#M672736</guid>
      <dc:creator />
      <dc:date>2014-08-26T07:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Exists Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Exists-Condition/m-p/648999#M672737</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;My understanding is that you want to populate a dummy record for a key combination that exists in the stock table, but not in the sales table. To do this, add a SalesKey (which exists only in the Sales table) and use this for the Exists. The final load should be from the Stock source or the STOCK resident table as this data does not exist in the Sales source:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SALES:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; CODE as SalesCode, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; CATEGORY as SalesCategory, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; COMPANY as SalesCompany, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; WEIGHT as SalesWeight,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; COMPANY&amp;amp;'-'&amp;amp;CATEGORY&amp;amp;'-'&amp;amp;CODE as Key,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &lt;STRONG&gt;COMPANY&amp;amp;'-'&amp;amp;CATEGORY&amp;amp;'-'&amp;amp;CODE as SalesKey&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;C&gt;&lt;/C&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(ooxml, embedded labels, table is SALES);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Concatenate(SALES)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD Distinct &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; StockCode As SalesCode, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; StockCategory As SalesCategory, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; StockCompany as SalesCompany, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; 0 as SalesWeight,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; StockCompany&amp;amp;'-'&amp;amp;StockCategory&amp;amp;'-'&amp;amp;StockCode as Key&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident &lt;STRONG&gt;STOCK&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Where Not Exists(SalesKey, StockCompany&amp;amp;'-'&amp;amp;StockCategory&amp;amp;'-'&amp;amp;StockCode);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP Field SalesKey; // not needed any more&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Aug 2014 07:36:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exists-Condition/m-p/648999#M672737</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-08-26T07:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: Exists Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Exists-Condition/m-p/649000#M672738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jonathan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Aug 2014 08:02:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exists-Condition/m-p/649000#M672738</guid>
      <dc:creator />
      <dc:date>2014-08-26T08:02:39Z</dc:date>
    </item>
  </channel>
</rss>

