<?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: Aggr? Just count first value in column in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggr-Just-count-first-value-in-column/m-p/1395708#M423730</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps I was overthinking this..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Aug 2017 05:15:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-08-14T05:15:17Z</dc:date>
    <item>
      <title>Aggr? Just count first value in column</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Just-count-first-value-in-column/m-p/1395704#M423726</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;&lt;/P&gt;&lt;P&gt;I have a list of data that I want to evaluate on just the minimum date value only. I have a list of people who have had tests performed, and these tests should be performed every day on each person during their visit. I want to be able to tell if the person had a test performed within 8 hours of arriving for their visit. If a person had has had multiple tests per visit, how do I just count the first test, and see if that was within 8 hours or arrival? Here's an example of the data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 826px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD colspan="1"&gt;Visit ID&lt;/TD&gt;&lt;TD colspan="1"&gt;Person ID&lt;/TD&gt;&lt;TD colspan="1"&gt;Arrival Date/Time&lt;/TD&gt;&lt;TD colspan="1"&gt;Test Date/Time&lt;/TD&gt;&lt;TD colspan="1"&gt;Interval&lt;/TD&gt;&lt;TD colspan="1"&gt;Less than 8 hours?&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" width="100"&gt;28704007&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-left: none;" width="73"&gt;1148967&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-left: none;" width="163"&gt;1/12/2015 20:54:58&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-left: none;" width="163"&gt;1/12/2015 21:39:52&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-left: none;" width="84"&gt;0.031180556&lt;/TD&gt;&lt;TD class="xl66" style="border-left: none;" width="179"&gt;Yes&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;28704007&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1148967&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;1/12/2015 20:54:58&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;4/12/2015 2:42:55&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;2.241631944&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;No&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;28704007&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1148967&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;1/12/2015 20:54:58&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;5/12/2015 3:13:27&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;3.262835648&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;No&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="20" style="border-top: none;"&gt;28693342&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;217067&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-top: none; border-left: none;"&gt;1/12/2015 21:02:00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-top: none; border-left: none;"&gt;1/12/2015 22:46:04&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0.072268519&lt;/TD&gt;&lt;TD class="xl70" style="border-top: none; border-left: none;"&gt;Yes&lt;/TD&gt;&lt;TD class="xl71" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;28698114&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;431145&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;1/12/2015 21:23:22&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;2/12/2015 1:55:14&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;0.188796296&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Yes&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="20" style="border-top: none;"&gt;28706266&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1152055&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-top: none; border-left: none;"&gt;1/12/2015 21:47:55&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-top: none; border-left: none;"&gt;4/12/2015 11:01:40&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;2.551215278&lt;/TD&gt;&lt;TD class="xl70" style="border-top: none; border-left: none;"&gt;No&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;28698465&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;666648&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;1/12/2015 21:55:00&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;1/12/2015 23:35:57&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;0.070104167&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Yes&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="20" style="border-top: none;"&gt;28670716&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;874611&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-top: none; border-left: none;"&gt;1/12/2015 22:16:05&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-top: none; border-left: none;"&gt;2/12/2015 4:53:14&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0.275798611&lt;/TD&gt;&lt;TD class="xl70" style="border-top: none; border-left: none;"&gt;Yes&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="20" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl70" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="20" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl70" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;The count that I would want to achieve here is 5. Five people had a test within 8 hours of arrival (Person 1148967 had 3 tests, but the first one was performed within 8 hours). One did not. Do I perform this using the Aggr function? What would this look like? What if I create a new table in the load script with FirstValue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks, &lt;/P&gt;&lt;P&gt;Glen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2017 01:59:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Just-count-first-value-in-column/m-p/1395704#M423726</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-14T01:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr? Just count first value in column</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Just-count-first-value-in-column/m-p/1395705#M423727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({&amp;lt;Person ID = {"=interval(test time - Arrival Time,'HH')&amp;lt;8"}&amp;gt;} Person ID )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2017 04:06:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Just-count-first-value-in-column/m-p/1395705#M423727</guid>
      <dc:creator>qliksus</dc:creator>
      <dc:date>2017-08-14T04:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr? Just count first value in column</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Just-count-first-value-in-column/m-p/1395706#M423728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you already calculated "&lt;STRONG&gt;Less than 8 hours&lt;/STRONG&gt;" ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count({&amp;lt;[]Less than 8 hours = {Yes}&amp;gt;} [Person ID])&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2017 04:12:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Just-count-first-value-in-column/m-p/1395706#M423728</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-08-14T04:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr? Just count first value in column</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Just-count-first-value-in-column/m-p/1395707#M423729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My bad?&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Count({&amp;lt;[Less than 8 hours] = {Yes}&amp;gt;} [Person ID])&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2017 04:12:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Just-count-first-value-in-column/m-p/1395707#M423729</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-08-14T04:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr? Just count first value in column</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Just-count-first-value-in-column/m-p/1395708#M423730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps I was overthinking this..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2017 05:15:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Just-count-first-value-in-column/m-p/1395708#M423730</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-14T05:15:17Z</dc:date>
    </item>
  </channel>
</rss>

