<?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: How to create subsets in the script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-create-subsets-in-the-script/m-p/465099#M701139</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, something that does work. I had to do some studying to figure this out properly &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Oct 2012 19:39:55 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2012-10-03T19:39:55Z</dc:date>
    <item>
      <title>How to create subsets in the script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-subsets-in-the-script/m-p/465094#M701134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am really stumped and would welcome some help. I have QVDs created from daily log files from our appointment booking software that shows me all the requests for appointments and the dates offered for each request. Our customer advisers can submit multiple requests per customer for different date ranges to best meet the customer's needs. I want to identify the earliest date offered per customer amongst the various requests. The only customer reference I have is postcode and we get requests from the same postcode that are hours apart and need to be handled separately. I would like to group the messages for the same postcode that have occurred within 10 minutes of each other and need a way to flag which messages are part of the same set and which are from a later call. I can flag the first message for the grouping I want but am struggling to assign each group a unique Group ID that I could then use to group the data by in my script. I have attached the table below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="WIDTH: 398px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="69"&gt;Message Time&lt;/TD&gt;&lt;TD class="xl63" style="border-left: medium none;" width="67"&gt;PostCode&lt;/TD&gt;&lt;TD class="xl63" style="border-left: medium none;" width="198"&gt;First Message for Postcode Timeframe Group&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="64"&gt;Group ID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: medium none;"&gt;00:03:57&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;a&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: medium none;"&gt;00:04:01&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;a&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;0&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: medium none;"&gt;00:04:14&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;a&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;0&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: medium none;"&gt;00:04:25&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;a&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;0&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: medium none;"&gt;00:11:46&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;a&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;0&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: medium none;"&gt;00:11:50&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;a&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;0&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: medium none;"&gt;00:11:54&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;a&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;0&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: medium none;"&gt;00:11:59&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;a&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;0&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: medium none;"&gt;00:12:04&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;a&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;0&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: medium none;"&gt;00:12:09&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;a&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;0&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: medium none;"&gt;00:12:48&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;a&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;0&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: medium none;"&gt;10:16:45&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;a&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: medium none;"&gt;10:16:59&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;a&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;0&lt;/TD&gt;&lt;TD align="right"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: medium none;"&gt;10:18:25&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;a&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;0&lt;/TD&gt;&lt;TD align="right"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: medium none;"&gt;10:19:43&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;a&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;0&lt;/TD&gt;&lt;TD align="right"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: medium none;"&gt;10:32:37&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;a&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: medium none;"&gt;10:35:30&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;a&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;0&lt;/TD&gt;&lt;TD align="right"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: medium none;"&gt;10:35:36&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;a&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;0&lt;/TD&gt;&lt;TD align="right"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: medium none;"&gt;11:14:50&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;a&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2012 17:35:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-subsets-in-the-script/m-p/465094#M701134</guid>
      <dc:creator />
      <dc:date>2012-10-03T17:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to create subsets in the script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-subsets-in-the-script/m-p/465095#M701135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;load MessageTime, &lt;/P&gt;&lt;P&gt;PostCode, &lt;/P&gt;&lt;P&gt;FirstMessage&lt;/P&gt;&lt;P&gt;from ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2:&lt;/P&gt;&lt;P&gt;load MessageTime, &lt;/P&gt;&lt;P&gt;PostCode, &lt;/P&gt;&lt;P&gt;FirstMessage&lt;/P&gt;&lt;P&gt;if(FirstMessage =1,peek(GroupID)+1,peek(GroupID)) as GroupID;&lt;/P&gt;&lt;P&gt;resident Table1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table Table1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2012 17:59:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-subsets-in-the-script/m-p/465095#M701135</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2012-10-03T17:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to create subsets in the script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-subsets-in-the-script/m-p/465096#M701136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you very much for responding so quickly. I have tried your suggestion but seem to get nulls for GroupID - is that becuase it doesn't exist in the original data? I tried something similar with previous and RowNo() but only managed to create the same ID for the first 2 members of each group. Am I missing something obvious?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2012 18:28:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-subsets-in-the-script/m-p/465096#M701136</guid>
      <dc:creator />
      <dc:date>2012-10-03T18:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to create subsets in the script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-subsets-in-the-script/m-p/465097#M701137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, let's try adding GroupID then:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;load MessageTime, &lt;/P&gt;&lt;P&gt;PostCode, &lt;/P&gt;&lt;P&gt;FirstMessage,&lt;/P&gt;&lt;P&gt;num(0) as GroupID&lt;/P&gt;&lt;P&gt;from ....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2012 18:41:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-subsets-in-the-script/m-p/465097#M701137</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2012-10-03T18:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to create subsets in the script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-subsets-in-the-script/m-p/465098#M701138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry - still not working for me. I have attached the test QVW that I have built. Maybe you can spot something I have done wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2012 18:51:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-subsets-in-the-script/m-p/465098#M701138</guid>
      <dc:creator />
      <dc:date>2012-10-03T18:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to create subsets in the script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-subsets-in-the-script/m-p/465099#M701139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, something that does work. I had to do some studying to figure this out properly &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2012 19:39:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-subsets-in-the-script/m-p/465099#M701139</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2012-10-03T19:39:55Z</dc:date>
    </item>
  </channel>
</rss>

