<?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 How to compare 2 non identical tables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-How-to-compare-2-non-identical-tables/m-p/240670#M91163</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Peter,&lt;/P&gt;&lt;P&gt;Here is sample of what I have,It take very long, as the two table are huge.&lt;/P&gt;&lt;P&gt;RESULT:&lt;BR /&gt;let vRowCount = NoOfRows('Source');&lt;BR /&gt;for i=0 to $(vRowCount)-1&lt;BR /&gt;&lt;BR /&gt;LET A = peek('A',$(i),'Source');&lt;BR /&gt; LET B= peek('B',$(i),'Source');&lt;BR /&gt; LET C = peek('C',$(i),'Source');&lt;BR /&gt;&lt;BR /&gt;LET vRowCount_2 = NoOfRows('TARGET');&lt;BR /&gt; for sf=0 to $(vRowCount_2)-1&lt;BR /&gt; LET A_F = peek('A',$(sf),'TARGET');&lt;BR /&gt; LET B_F = peek('B',$(sf),'TARGET');&lt;BR /&gt; LET C_F = peek('C',$(sf),'TARGET');&lt;BR /&gt; LET RANK_F = peek('RANK',$(sf),'TARGET');&lt;BR /&gt;&lt;BR /&gt; if(A=A_F AND B=B_F AND C='ALL' AND RANK_F=0 ) THEN&lt;BR /&gt; load '$(A)' ,B_F, A_F&lt;BR /&gt; RESIDENT TARGET WHERE A_F='$(A)' AND B_F='$(B)';&lt;BR /&gt; EXIT FOR&lt;BR /&gt; end if&lt;BR /&gt; if(A=B_F AND B=C_F AND RANK_F=1 ) THEN&lt;BR /&gt; load '$(A)' ,B_F, A_F,C_F&lt;BR /&gt; RESIDENT TARGET WHERE C_F='$(A)' AND B_F='$(B)'EXIT FOR&lt;BR /&gt; end if&lt;BR /&gt; NEXT sf&lt;BR /&gt; next i&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 06 Mar 2011 18:51:40 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-03-06T18:51:40Z</dc:date>
    <item>
      <title>Help:How to compare 2 non identical tables</title>
      <link>https://community.qlik.com/t5/QlikView/Help-How-to-compare-2-non-identical-tables/m-p/240668#M91161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I developed a qlick view report with logic like below&lt;BR /&gt;&lt;BR /&gt;for (tableA.row=0 to tableA.max(row)&lt;BR /&gt;&lt;BR /&gt; If tableA.(a&amp;gt;0 and b&amp;gt;0,c&amp;gt;0) load tableB.*,tableA.a,tableA.b,tableA.c from resident tableB where tableB.rank=0&lt;BR /&gt;&lt;BR /&gt; If tableA.(b&amp;gt;0 and c&amp;gt;0,d&amp;gt;0) load tableB.*,tableA.a,tableA.b,tableA.c from resident tableB where tableB.rank=1&lt;BR /&gt;&lt;BR /&gt; If tableA.(c&amp;gt;0 and d&amp;gt;0,e&amp;gt;0) load tableB.*,tableA.a,tableA.b,tableA.c from resident tableB where tableB.rank=2&lt;BR /&gt;&lt;BR /&gt; If tableA.(d&amp;gt;0 and e&amp;gt;0,f&amp;gt;0) load tableB.*,tableA.a,tableA.b,tableA.c from resident tableB where tableB.rank=3&lt;BR /&gt;&lt;BR /&gt;tableA.next row&lt;BR /&gt;&lt;BR /&gt;end loop&lt;/P&gt;&lt;P&gt;I had to use two For Loops( For each row in tableA check all rows in table when matched Load/Display ( like Sorting))&lt;/P&gt;&lt;P&gt;It works fine but I think is not an optimum solution as it takes long time for huge tables (with Lots of data).&lt;/P&gt;&lt;P&gt;I want to know if there is any function or feature that can compare two sets of data in QlikView like in my case which is more optimal .&lt;/P&gt;&lt;P&gt;i am new to QlikView reports any advice or suggestions in this will help a lot&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Mar 2011 17:47:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-How-to-compare-2-non-identical-tables/m-p/240668#M91161</guid>
      <dc:creator />
      <dc:date>2011-03-06T17:47:34Z</dc:date>
    </item>
    <item>
      <title>How to compare 2 non identical tables</title>
      <link>https://community.qlik.com/t5/QlikView/Help-How-to-compare-2-non-identical-tables/m-p/240669#M91162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would be useful to have some examples.&lt;BR /&gt;On first glance would suggest to construct a loop, in which you count your conditions and the access the tableB with the PEEK-command:&lt;BR /&gt;Quote&lt;/P&gt;&lt;H4&gt;peek&lt;A id="kanchor48" name="kanchor48"&gt;&lt;/A&gt;&lt;A id="peek" name="peek"&gt;&lt;/A&gt;( fieldname [ , row [ , tablename ] ] )&lt;/H4&gt;&lt;P&gt;Returns the contents of the fieldname in the record specified by row in the input table tablename. Data are fetched from the associative QlikView database.&lt;/P&gt;&lt;P&gt;Fieldname must be given as a string (e.g. a quoted literal).&lt;/P&gt;&lt;P&gt;Row must be an integer. 0 denotes the first record, 1 the second and so on. Negative numbers indicate order from the end of the table. -1 denotes the last record read.&lt;/P&gt;&lt;P&gt;If no row is stated, -1 is assumed.&lt;/P&gt;&lt;P&gt;Tablename is a &lt;A&gt;table label&lt;/A&gt; without the ending colon. If no tablename is stated, the current table is assumed. If used outside the load statement or referring to another table, the tablename must be included.&lt;/P&gt;&lt;P&gt;Unquote&lt;/P&gt;&lt;P&gt;HTH&lt;BR /&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Mar 2011 18:33:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-How-to-compare-2-non-identical-tables/m-p/240669#M91162</guid>
      <dc:creator>prieper</dc:creator>
      <dc:date>2011-03-06T18:33:46Z</dc:date>
    </item>
    <item>
      <title>How to compare 2 non identical tables</title>
      <link>https://community.qlik.com/t5/QlikView/Help-How-to-compare-2-non-identical-tables/m-p/240670#M91163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Peter,&lt;/P&gt;&lt;P&gt;Here is sample of what I have,It take very long, as the two table are huge.&lt;/P&gt;&lt;P&gt;RESULT:&lt;BR /&gt;let vRowCount = NoOfRows('Source');&lt;BR /&gt;for i=0 to $(vRowCount)-1&lt;BR /&gt;&lt;BR /&gt;LET A = peek('A',$(i),'Source');&lt;BR /&gt; LET B= peek('B',$(i),'Source');&lt;BR /&gt; LET C = peek('C',$(i),'Source');&lt;BR /&gt;&lt;BR /&gt;LET vRowCount_2 = NoOfRows('TARGET');&lt;BR /&gt; for sf=0 to $(vRowCount_2)-1&lt;BR /&gt; LET A_F = peek('A',$(sf),'TARGET');&lt;BR /&gt; LET B_F = peek('B',$(sf),'TARGET');&lt;BR /&gt; LET C_F = peek('C',$(sf),'TARGET');&lt;BR /&gt; LET RANK_F = peek('RANK',$(sf),'TARGET');&lt;BR /&gt;&lt;BR /&gt; if(A=A_F AND B=B_F AND C='ALL' AND RANK_F=0 ) THEN&lt;BR /&gt; load '$(A)' ,B_F, A_F&lt;BR /&gt; RESIDENT TARGET WHERE A_F='$(A)' AND B_F='$(B)';&lt;BR /&gt; EXIT FOR&lt;BR /&gt; end if&lt;BR /&gt; if(A=B_F AND B=C_F AND RANK_F=1 ) THEN&lt;BR /&gt; load '$(A)' ,B_F, A_F,C_F&lt;BR /&gt; RESIDENT TARGET WHERE C_F='$(A)' AND B_F='$(B)'EXIT FOR&lt;BR /&gt; end if&lt;BR /&gt; NEXT sf&lt;BR /&gt; next i&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Mar 2011 18:51:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-How-to-compare-2-non-identical-tables/m-p/240670#M91163</guid>
      <dc:creator />
      <dc:date>2011-03-06T18:51:40Z</dc:date>
    </item>
  </channel>
</rss>

