<?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: Count values in a different table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-values-in-a-different-table/m-p/393001#M486877</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you're not interested in the total rows of table Test, but a count of related records based on SDS_ID. For that you first need to join the two tables. You can then calculate a count using the combined table. Or you could calculate the counts in the UI with expressions in charts instead of in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a simple example for the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test:&lt;/P&gt;&lt;P&gt;Load SDS_ID, a,b,c&lt;/P&gt;&lt;P&gt;from ...table1...;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;join Load SDS_ID, e, f&lt;/P&gt;&lt;P&gt;from ...table2...; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Counts:&lt;/P&gt;&lt;P&gt;Load SDS_ID, count(a)&lt;/P&gt;&lt;P&gt;resident Test&lt;/P&gt;&lt;P&gt;group by SDS_ID;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Feb 2013 12:31:23 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2013-02-28T12:31:23Z</dc:date>
    <item>
      <title>Count values in a different table</title>
      <link>https://community.qlik.com/t5/QlikView/Count-values-in-a-different-table/m-p/392998#M486874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I have a table loaded (e.g. name 'Outlook') and during the load of a second table (e.g. 'Test') I want to count the number of records that exist in 'outlook' how can i do this? Do you have an example? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both tables have an attribute by the name of 'SDS_ID'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 12:16:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-values-in-a-different-table/m-p/392998#M486874</guid>
      <dc:creator />
      <dc:date>2013-02-28T12:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: Count values in a different table</title>
      <link>https://community.qlik.com/t5/QlikView/Count-values-in-a-different-table/m-p/392999#M486875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in script you can add&lt;/P&gt;&lt;P&gt;rowno() as NunLine&lt;/P&gt;&lt;P&gt;that way you have that you are looking for..&lt;/P&gt;&lt;P&gt;HOPE it helps you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 12:25:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-values-in-a-different-table/m-p/392999#M486875</guid>
      <dc:creator>fdelacal</dc:creator>
      <dc:date>2013-02-28T12:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: Count values in a different table</title>
      <link>https://community.qlik.com/t5/QlikView/Count-values-in-a-different-table/m-p/393000#M486876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would I put that as part of the second table load? if so, how can I use the rowno to look into table1?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 12:29:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-values-in-a-different-table/m-p/393000#M486876</guid>
      <dc:creator />
      <dc:date>2013-02-28T12:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: Count values in a different table</title>
      <link>https://community.qlik.com/t5/QlikView/Count-values-in-a-different-table/m-p/393001#M486877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you're not interested in the total rows of table Test, but a count of related records based on SDS_ID. For that you first need to join the two tables. You can then calculate a count using the combined table. Or you could calculate the counts in the UI with expressions in charts instead of in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a simple example for the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test:&lt;/P&gt;&lt;P&gt;Load SDS_ID, a,b,c&lt;/P&gt;&lt;P&gt;from ...table1...;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;join Load SDS_ID, e, f&lt;/P&gt;&lt;P&gt;from ...table2...; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Counts:&lt;/P&gt;&lt;P&gt;Load SDS_ID, count(a)&lt;/P&gt;&lt;P&gt;resident Test&lt;/P&gt;&lt;P&gt;group by SDS_ID;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 12:31:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-values-in-a-different-table/m-p/393001#M486877</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-02-28T12:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Count values in a different table</title>
      <link>https://community.qlik.com/t5/QlikView/Count-values-in-a-different-table/m-p/393002#M486878</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;If you are looking for the total row count, use below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;TMP:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; YEAR, VALUE&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2013, 1200&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2012,1400&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;TEMP:&lt;BR /&gt;LOAD&lt;BR /&gt;YEAR AS YEAR,&lt;BR /&gt;YEAR AS YEAR_1, &lt;BR /&gt;VALUE/12 AS NEWVALUE,&lt;BR /&gt;recno() AS RecordCount&lt;BR /&gt;RESIDENT TMP;&lt;/P&gt;&lt;P&gt;LET Count = PEEK('RecordCount',-1,'TEMP');&lt;BR /&gt;DROP TABLE TMP;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 12:32:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-values-in-a-different-table/m-p/393002#M486878</guid>
      <dc:creator />
      <dc:date>2013-02-28T12:32:31Z</dc:date>
    </item>
  </channel>
</rss>

