<?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 Problem counting headers in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-counting-headers/m-p/671077#M674432</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two tables: Claim Headers, and Referrals, Referrals has a many-to-one releationship with the Headers, keys are DealerID and Claim Number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to calculate Total No. of Referrals / Total No. Claims.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem with the script below is that if a claim has more than one rferral, the header gets counted more than once - I could make a second pass of the table and count distinct claim numbers, but is there a better way?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ClaimStats2T:&lt;BR /&gt;LOAD&lt;BR /&gt;DealerID, // key&lt;BR /&gt;[Claim Number], // key&lt;BR /&gt;KPIYear,&lt;BR /&gt;KPIMonth,&lt;BR /&gt;CountClaims // is always 1, used to sum&lt;BR /&gt;Resident ClaimFacts&lt;BR /&gt;;&lt;BR /&gt;Left Join&lt;BR /&gt;LOAD&lt;BR /&gt;DealerID, // key&lt;BR /&gt;[Claim Number], //key&lt;BR /&gt;ReferredDate,&lt;BR /&gt;1 as ClaimReferred&lt;BR /&gt;;&lt;BR /&gt;SQL &lt;/P&gt;&lt;P&gt;... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Marty.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Aug 2014 09:10:27 GMT</pubDate>
    <dc:creator>martynlloyd</dc:creator>
    <dc:date>2014-08-13T09:10:27Z</dc:date>
    <item>
      <title>Problem counting headers</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-counting-headers/m-p/671077#M674432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two tables: Claim Headers, and Referrals, Referrals has a many-to-one releationship with the Headers, keys are DealerID and Claim Number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to calculate Total No. of Referrals / Total No. Claims.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem with the script below is that if a claim has more than one rferral, the header gets counted more than once - I could make a second pass of the table and count distinct claim numbers, but is there a better way?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ClaimStats2T:&lt;BR /&gt;LOAD&lt;BR /&gt;DealerID, // key&lt;BR /&gt;[Claim Number], // key&lt;BR /&gt;KPIYear,&lt;BR /&gt;KPIMonth,&lt;BR /&gt;CountClaims // is always 1, used to sum&lt;BR /&gt;Resident ClaimFacts&lt;BR /&gt;;&lt;BR /&gt;Left Join&lt;BR /&gt;LOAD&lt;BR /&gt;DealerID, // key&lt;BR /&gt;[Claim Number], //key&lt;BR /&gt;ReferredDate,&lt;BR /&gt;1 as ClaimReferred&lt;BR /&gt;;&lt;BR /&gt;SQL &lt;/P&gt;&lt;P&gt;... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Marty.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2014 09:10:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-counting-headers/m-p/671077#M674432</guid>
      <dc:creator>martynlloyd</dc:creator>
      <dc:date>2014-08-13T09:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problem counting headers</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-counting-headers/m-p/671078#M674435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would not&amp;nbsp;&amp;nbsp; =Count(&lt;STRONG&gt;Distinct &lt;/STRONG&gt;..&amp;nbsp; be an option? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2014 09:14:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-counting-headers/m-p/671078#M674435</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-08-13T09:14:14Z</dc:date>
    </item>
  </channel>
</rss>

