<?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 first instance of after a given date(based on another field) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-first-instance-of-after-a-given-date-based-on-another/m-p/20383#M768084</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure what you mean when you say that the Event table is not related to the Activity table. If they're not related, what dates do you want to compare?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sorin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Jun 2018 13:13:48 GMT</pubDate>
    <dc:creator>isorinrusu</dc:creator>
    <dc:date>2018-06-13T13:13:48Z</dc:date>
    <item>
      <title>Count first instance of after a given date(based on another field)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-first-instance-of-after-a-given-date-based-on-another/m-p/20380#M768081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two tables:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;1 shows events which occurred&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2 shows the number of activities and related details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create a flag which I will count to say if an activity occurred after an event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g if there was an event occurred 12.06.18 and an several activities occurred post 12.06.18 e.g. 1 activity on 13.06 and 2 activities on 14.06 then I just want to identify these but ultimately count them as just 1.&amp;nbsp; I've been trying a flag in the script and then count distinct in the front end but not getting what I want. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There could be multiple events and I don't want to count activities before an event has happened.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will also want to understand difference between dates like event and first activity after event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-first-instance-of-after-a-given-date-based-on-another/m-p/20380#M768081</guid>
      <dc:creator>alwayslearning</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Count first instance of after a given date(based on another field)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-first-instance-of-after-a-given-date-based-on-another/m-p/20381#M768082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kwok,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could I see your data model? I need to know how the activities and events are associated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sorin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2018 11:39:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-first-instance-of-after-a-given-date-based-on-another/m-p/20381#M768082</guid>
      <dc:creator>isorinrusu</dc:creator>
      <dc:date>2018-06-13T11:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Count first instance of after a given date(based on another field)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-first-instance-of-after-a-given-date-based-on-another/m-p/20382#M768083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They are associated by an Account ID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="158" style="width: 150px; height: 160px;" width="148"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="89"&gt;Table 1: Account Table&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20"&gt;Account ID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;&lt;P&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="267"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD colspan="2" height="20" width="181"&gt;Table 2: Activity&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20"&gt;Account ID&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;"&gt;Activity Name&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;"&gt;Activity Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Test&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;12.06&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Example&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;14.06&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Test&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;12.06&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;3&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Example&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;10.06&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="211"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD colspan="2" height="20" width="137"&gt;Table 3: Event&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20"&gt;Account ID&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;"&gt;Event&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;"&gt;Event Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Event 1&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;13.05&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Event 2&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;13.06&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Event 1&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;&lt;P&gt;13.06&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a sample of the 3 tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above you see Account 1 had two events and both had activities post event so that would both be counted.&lt;/P&gt;&lt;P&gt;Account 2 had one event but no activities for this account happened after this event. So I don't want to count this one.&lt;/P&gt;&lt;P&gt;(The activity table does not necessarily have a direct correlation with an event so there is no activity ID which directly links to an event ID.&amp;nbsp; So that is why I want to use post activity after event)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2018 11:53:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-first-instance-of-after-a-given-date-based-on-another/m-p/20382#M768083</guid>
      <dc:creator>alwayslearning</dc:creator>
      <dc:date>2018-06-13T11:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Count first instance of after a given date(based on another field)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-first-instance-of-after-a-given-date-based-on-another/m-p/20383#M768084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure what you mean when you say that the Event table is not related to the Activity table. If they're not related, what dates do you want to compare?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sorin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2018 13:13:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-first-instance-of-after-a-given-date-based-on-another/m-p/20383#M768084</guid>
      <dc:creator>isorinrusu</dc:creator>
      <dc:date>2018-06-13T13:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: Count first instance of after a given date(based on another field)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-first-instance-of-after-a-given-date-based-on-another/m-p/20384#M768085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sorin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to compare Event Date vs Activity date.&amp;nbsp; It is related via the account but nothing more than that.&amp;nbsp; So I mean you cannot say that this activity was directly related to this event.&amp;nbsp; (More of the analysis issue to solve rather than data issue which I'm trying to solve here)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I am looking to achieve is find first activity date after an event for every event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2018 13:35:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-first-instance-of-after-a-given-date-based-on-another/m-p/20384#M768085</guid>
      <dc:creator>alwayslearning</dc:creator>
      <dc:date>2018-06-13T13:35:58Z</dc:date>
    </item>
  </channel>
</rss>

