<?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: filter out the rows based on specific table key field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/filter-out-the-rows-based-on-specific-table-key-field/m-p/637955#M1092148</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;remove comma after &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;SalesPerson&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;and use a preceding load &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tmp:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;load distinct id as newid&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;resident &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;Fact&lt;/SPAN&gt;;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SalesPerson:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD id,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SalesPerson&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Where Exists(newid, id);&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM yourdatabasetable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;drop table tmp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 May 2014 13:10:29 GMT</pubDate>
    <dc:creator>maxgro</dc:creator>
    <dc:date>2014-05-19T13:10:29Z</dc:date>
    <item>
      <title>filter out the rows based on specific table key field</title>
      <link>https://community.qlik.com/t5/QlikView/filter-out-the-rows-based-on-specific-table-key-field/m-p/637950#M1092143</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 wanted to filter out the rows based on key field of a fact table that is peresent in different tab in qlikview script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table that has subset ratio of only 7%, so i want to remove those rows whose corresponding ids are not present in main fact table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought of writing below script, but not sure how to point this exist condition to only fact table id. As this id field is present in many tables in data model which are linked to fact table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fact:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;id,&lt;/P&gt;&lt;P&gt;xyz;&lt;/P&gt;&lt;P&gt;...from fact;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--many tables in between these tables has id fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SalesPerson:&lt;/P&gt;&lt;P&gt;LOAD id,&lt;/P&gt;&lt;P&gt;SalesPerson, from ...&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Where Exists(id)&lt;/STRONG&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 12:31:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/filter-out-the-rows-based-on-specific-table-key-field/m-p/637950#M1092143</guid>
      <dc:creator>surajap123</dc:creator>
      <dc:date>2014-05-19T12:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: filter out the rows based on specific table key field</title>
      <link>https://community.qlik.com/t5/QlikView/filter-out-the-rows-based-on-specific-table-key-field/m-p/637951#M1092144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maybe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tmp:&lt;/P&gt;&lt;P&gt;load distinct id as newid&lt;/P&gt;&lt;P&gt;resident &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Fact&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SalesPerson:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD id,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SalesPerson, from ...&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Where Exists(newid, id)&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table tmp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 12:34:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/filter-out-the-rows-based-on-specific-table-key-field/m-p/637951#M1092144</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-05-19T12:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: filter out the rows based on specific table key field</title>
      <link>https://community.qlik.com/t5/QlikView/filter-out-the-rows-based-on-specific-table-key-field/m-p/637952#M1092145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Massimo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks !!&lt;/P&gt;&lt;P&gt;However i am getting error incorrect syntact near ''&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG&gt;newid&lt;/STRONG&gt;&lt;/SPAN&gt;''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more information. My table with &lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG&gt;Where Exists(newid, id)&lt;/STRONG&gt;&lt;/SPAN&gt;; is pulling the data from source database.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 12:55:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/filter-out-the-rows-based-on-specific-table-key-field/m-p/637952#M1092145</guid>
      <dc:creator>surajap123</dc:creator>
      <dc:date>2014-05-19T12:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: filter out the rows based on specific table key field</title>
      <link>https://community.qlik.com/t5/QlikView/filter-out-the-rows-based-on-specific-table-key-field/m-p/637953#M1092146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the field name correctly may be the reason or you have to use Mapping table in place of the Where Exists.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 13:03:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/filter-out-the-rows-based-on-specific-table-key-field/m-p/637953#M1092146</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-05-19T13:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: filter out the rows based on specific table key field</title>
      <link>https://community.qlik.com/t5/QlikView/filter-out-the-rows-based-on-specific-table-key-field/m-p/637954#M1092147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can refer table in the Exists(), like:&lt;/P&gt;&lt;P&gt;Where Exists(TableName&lt;STRONG&gt;.id&lt;/STRONG&gt;, id) ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 13:10:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/filter-out-the-rows-based-on-specific-table-key-field/m-p/637954#M1092147</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-05-19T13:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: filter out the rows based on specific table key field</title>
      <link>https://community.qlik.com/t5/QlikView/filter-out-the-rows-based-on-specific-table-key-field/m-p/637955#M1092148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;remove comma after &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;SalesPerson&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;and use a preceding load &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tmp:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;load distinct id as newid&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;resident &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;Fact&lt;/SPAN&gt;;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SalesPerson:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD id,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SalesPerson&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Where Exists(newid, id);&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM yourdatabasetable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;drop table tmp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 13:10:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/filter-out-the-rows-based-on-specific-table-key-field/m-p/637955#M1092148</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-05-19T13:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: filter out the rows based on specific table key field</title>
      <link>https://community.qlik.com/t5/QlikView/filter-out-the-rows-based-on-specific-table-key-field/m-p/637956#M1092149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this is a working example you can adapt to your req&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OLEDB CONNECT32 TO ................;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A:&lt;/P&gt;&lt;P&gt;LOAD DEPTNO,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DNAME,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOC;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM TEST.DEPT&lt;/P&gt;&lt;P&gt;where DEPTNO &amp;lt;&amp;gt; 11;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tmp:&lt;/P&gt;&lt;P&gt;load distinct DEPTNO as newfield Resident A;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B:&lt;/P&gt;&lt;P&gt;LOAD EMPNO,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENAME,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEPTNO&lt;/P&gt;&lt;P&gt;Where Exists (newfield, DEPTNO)&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM TEST.EMP;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP table Tmp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 13:18:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/filter-out-the-rows-based-on-specific-table-key-field/m-p/637956#M1092149</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-05-19T13:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: filter out the rows based on specific table key field</title>
      <link>https://community.qlik.com/t5/QlikView/filter-out-the-rows-based-on-specific-table-key-field/m-p/637957#M1092150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Massimo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks you so much for the script. It is working and i could fully reload the document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However subset ratio is still 7% for the key field, in the table with 'where exist condition'. I am not sure why.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 14:02:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/filter-out-the-rows-based-on-specific-table-key-field/m-p/637957#M1092150</guid>
      <dc:creator>surajap123</dc:creator>
      <dc:date>2014-05-19T14:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: filter out the rows based on specific table key field</title>
      <link>https://community.qlik.com/t5/QlikView/filter-out-the-rows-based-on-specific-table-key-field/m-p/637958#M1092151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;Subset ratio&lt;/EM&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt; is the number of distinct values of this field found in this table as compared to the total number of distinct values of this field (that is other tables as well)&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suppose if the subset ratio in the table where you want to add the exists is 7% this means you have many different values in other tables not present in this table. &lt;/P&gt;&lt;P&gt;In your case&lt;/P&gt;&lt;P&gt;many Sales Person (id) values in fact tables &lt;/P&gt;&lt;P&gt;few Sales Person (id) values in &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px;"&gt;SalesPerson&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px;"&gt;Check in your source db if this assumption is correct and let we know.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With exists you can limit the record loaded in Sales Person; subset ratio will not increase.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 16:12:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/filter-out-the-rows-based-on-specific-table-key-field/m-p/637958#M1092151</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-05-19T16:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: filter out the rows based on specific table key field</title>
      <link>https://community.qlik.com/t5/QlikView/filter-out-the-rows-based-on-specific-table-key-field/m-p/637959#M1092152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks you so much for clearing my basic doubt..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 13:56:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/filter-out-the-rows-based-on-specific-table-key-field/m-p/637959#M1092152</guid>
      <dc:creator>surajap123</dc:creator>
      <dc:date>2014-05-20T13:56:28Z</dc:date>
    </item>
  </channel>
</rss>

