<?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: Create a Grouped Table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Create-a-Grouped-Table/m-p/888283#M659209</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Phil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find the attached document and let me know whether this will be of any help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;RK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 May 2015 15:11:39 GMT</pubDate>
    <dc:creator>rakesh_kumar</dc:creator>
    <dc:date>2015-05-06T15:11:39Z</dc:date>
    <item>
      <title>Create a Grouped Table</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-Grouped-Table/m-p/888282#M659208</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 am wanting to create a table from a set of data to show when the last date ta staff member was off sick for more than 5 days consecutively.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My data has each date the person was sick.&amp;nbsp; I have attached a spreadsheet which shows sample data and expected table output. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note the data also contains other absences (not just sickness) so I need a where statement in there too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help, it is driving me insane !!!&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Phil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 14:02:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-Grouped-Table/m-p/888282#M659208</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-06T14:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Create a Grouped Table</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-Grouped-Table/m-p/888283#M659209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Phil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find the attached document and let me know whether this will be of any help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;RK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 15:11:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-Grouped-Table/m-p/888283#M659209</guid>
      <dc:creator>rakesh_kumar</dc:creator>
      <dc:date>2015-05-06T15:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: Create a Grouped Table</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-Grouped-Table/m-p/888284#M659210</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;one solution might be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_162970_Pic3.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/85867_QlikCommunity_Thread_162970_Pic3.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_162970_Pic4.JPG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/85868_QlikCommunity_Thread_162970_Pic4.JPG" style="height: 291px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_162970_Pic5.JPG" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/85869_QlikCommunity_Thread_162970_Pic5.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_162970_Pic1.JPG" class="image-4 jive-image" src="https://community.qlik.com/legacyfs/online/85870_QlikCommunity_Thread_162970_Pic1.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_162970_Pic2.JPG" class="image-5 jive-image" src="https://community.qlik.com/legacyfs/online/85871_QlikCommunity_Thread_162970_Pic2.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14309518211058453" jivemacro_uid="_14309518211058453"&gt;
&lt;P&gt;tabStaffPresence:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;LOAD * FROM [&lt;/SPAN&gt;&lt;A class="" data-containerid="-1" data-containertype="-1" data-objectid="162831" data-objecttype="13" href="https://community.qlik.com/servlet/JiveServlet/download/2061-162970-769058-162831/Last_Sick.xlsx"&gt;https://community.qlik.com/servlet/JiveServlet/download/769058-162831/Last_Sick.xlsx&lt;/A&gt;&lt;SPAN&gt;] (ooxml, embedded labels, table is Data);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;tabTemp:&lt;/P&gt;
&lt;P&gt;LOAD Person,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Person&amp;lt;&amp;gt;Previous(Person) or Absence&amp;lt;&amp;gt;Previous(Absence), Date, Peek(StartDate)) as StartDate,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Absence&lt;/P&gt;
&lt;P&gt;Resident tabStaffPresence&lt;/P&gt;
&lt;P&gt;Order By Person, Date;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;tabStaffAbsences:&lt;/P&gt;
&lt;P&gt;LOAD *,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EndDate-StartDate+1 as DurationDays;&lt;/P&gt;
&lt;P&gt;LOAD Person,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; StartDate,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date as EndDate,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Absence as AbsenceType&lt;/P&gt;
&lt;P&gt;Resident tabTemp&lt;/P&gt;
&lt;P&gt;Where (Person&amp;lt;&amp;gt;Previous(Person) or Absence&amp;lt;&amp;gt;Previous(Absence)) and Len(Absence)&lt;/P&gt;
&lt;P&gt;Order By Person, Date desc;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP Table tabTemp;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 22:37:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-Grouped-Table/m-p/888284#M659210</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2015-05-06T22:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: Create a Grouped Table</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-Grouped-Table/m-p/888285#M659211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This looks like what I need, however I am linking to another table, which means this sickness table can only have a single row of data for each person, as per the output table in the spreadsheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to make it a table (of latest Long Term Sickness rather than doing analysis?&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Phil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 14:37:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-Grouped-Table/m-p/888285#M659211</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-07T14:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: Create a Grouped Table</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-Grouped-Table/m-p/888286#M659212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Marco&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;This looks like what I need, however I am linking to another table, which means this sickness table can only have a single row of data for each person, as per the output table in the spreadsheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Is it possible to make it a table in the load script (of latest Long Term Sickness) rather than doing it as analysis?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Phil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2015 08:29:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-Grouped-Table/m-p/888286#M659212</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-08T08:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: Create a Grouped Table</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-Grouped-Table/m-p/888287#M659213</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;starting from my previous post, this preceding load added to the tabStaffAbsences LOAD should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14310801188056411" jivemacro_uid="_14310801188056411"&gt;
&lt;P&gt;LOAD Person,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(AbsenceType, -EndDate) as AbsenceType,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(FirstSortedValue(StartDate, -EndDate)) as StartDate,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Max(EndDate)) as EndDate,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(DurationDays, -EndDate) as DurationDays&lt;/P&gt;
&lt;P&gt;Where DurationDays&amp;gt;=5&lt;/P&gt;
&lt;P&gt;Group By Person;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I guess, there are shorter solutions to your question ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2015 10:19:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-Grouped-Table/m-p/888287#M659213</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2015-05-08T10:19:01Z</dc:date>
    </item>
  </channel>
</rss>

