<?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 Grouping Ranges of dates together in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Grouping-Ranges-of-dates-together/m-p/1539524#M439353</link>
    <description>&lt;DIV class="topic-subject-wrapper"&gt;&lt;DIV class="lia-message-subject lia-component-message-view-widget-subject"&gt;&lt;DIV class="MessageSubject"&gt;Hi&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-body lia-component-body-signature-highlight-escalation"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having trouble figuring this one out and feels like it should be relatively simple&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to report on absence and more specifically, the number of occurrences. So if an employee was off from 1 Feb to 3rd of Feb, this would be 1 occurrence with 3 days in it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The raw data would look something like this&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EMPLOYEE&amp;nbsp; &amp;nbsp; &amp;nbsp; Date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 04/02/2019&lt;/P&gt;&lt;P&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 05/02/2019&lt;/P&gt;&lt;P&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 06/02/2019&lt;/P&gt;&lt;P&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 12/02/2019&lt;/P&gt;&lt;P&gt;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;17/01/2019&lt;/P&gt;&lt;P&gt;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;18/01/2019&lt;/P&gt;&lt;P&gt;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;21/01/2019&lt;/P&gt;&lt;P&gt;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;22/01/2019&lt;/P&gt;&lt;P&gt;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 30/01/2019&lt;/P&gt;&lt;P&gt;In Summary, Employee A would have 2 occurrences, the first lasting 3 days, the second lasting 1 day&lt;/P&gt;&lt;P&gt;Employee B would also have 2 occurrences, the first lasting 4 days (but slightly more complicated as it spans over a weekend) and the second occurrence of 1 day&lt;/P&gt;&lt;P&gt;Feels like I need to somehow group the dates together, using peek but I'm just not sure how to group in this way. Anyone done anything similar before?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Sat, 16 Nov 2024 04:33:35 GMT</pubDate>
    <dc:creator>gavin_kite</dc:creator>
    <dc:date>2024-11-16T04:33:35Z</dc:date>
    <item>
      <title>Grouping Ranges of dates together</title>
      <link>https://community.qlik.com/t5/QlikView/Grouping-Ranges-of-dates-together/m-p/1539524#M439353</link>
      <description>&lt;DIV class="topic-subject-wrapper"&gt;&lt;DIV class="lia-message-subject lia-component-message-view-widget-subject"&gt;&lt;DIV class="MessageSubject"&gt;Hi&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-body lia-component-body-signature-highlight-escalation"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having trouble figuring this one out and feels like it should be relatively simple&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to report on absence and more specifically, the number of occurrences. So if an employee was off from 1 Feb to 3rd of Feb, this would be 1 occurrence with 3 days in it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The raw data would look something like this&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EMPLOYEE&amp;nbsp; &amp;nbsp; &amp;nbsp; Date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 04/02/2019&lt;/P&gt;&lt;P&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 05/02/2019&lt;/P&gt;&lt;P&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 06/02/2019&lt;/P&gt;&lt;P&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 12/02/2019&lt;/P&gt;&lt;P&gt;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;17/01/2019&lt;/P&gt;&lt;P&gt;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;18/01/2019&lt;/P&gt;&lt;P&gt;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;21/01/2019&lt;/P&gt;&lt;P&gt;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;22/01/2019&lt;/P&gt;&lt;P&gt;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 30/01/2019&lt;/P&gt;&lt;P&gt;In Summary, Employee A would have 2 occurrences, the first lasting 3 days, the second lasting 1 day&lt;/P&gt;&lt;P&gt;Employee B would also have 2 occurrences, the first lasting 4 days (but slightly more complicated as it spans over a weekend) and the second occurrence of 1 day&lt;/P&gt;&lt;P&gt;Feels like I need to somehow group the dates together, using peek but I'm just not sure how to group in this way. Anyone done anything similar before?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:33:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grouping-Ranges-of-dates-together/m-p/1539524#M439353</guid>
      <dc:creator>gavin_kite</dc:creator>
      <dc:date>2024-11-16T04:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping Ranges of dates together</title>
      <link>https://community.qlik.com/t5/QlikView/Grouping-Ranges-of-dates-together/m-p/1539616#M439356</link>
      <description>&lt;P&gt;So, in your example, can you explain why does A have 2 absent occurrences? Also, can you explain how did you get 3 and 1?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Feb 2019 12:30:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grouping-Ranges-of-dates-together/m-p/1539616#M439356</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-02-05T12:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping Ranges of dates together</title>
      <link>https://community.qlik.com/t5/QlikView/Grouping-Ranges-of-dates-together/m-p/1539619#M439357</link>
      <description>&lt;P&gt;Try Below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;load * , if(peek(EMPLOYEE) &amp;lt;&amp;gt; EMPLOYEE ,1 ,if( peek(EMPLOYEE) = EMPLOYEE and NetWorkDays(peek(Date),Date)= 2 ,peek(occur) ,peek(occur) +1 ) )as occur Inline [&lt;BR /&gt;EMPLOYEE,Date&lt;/P&gt;&lt;P&gt;A,04/02/2019&lt;/P&gt;&lt;P&gt;A,05/02/2019&lt;/P&gt;&lt;P&gt;A,06/02/2019&lt;/P&gt;&lt;P&gt;A,12/02/2019&lt;/P&gt;&lt;P&gt;B,17/01/2019&lt;/P&gt;&lt;P&gt;B,18/01/2019&lt;/P&gt;&lt;P&gt;B,21/01/2019&lt;/P&gt;&lt;P&gt;B,22/01/2019&lt;/P&gt;&lt;P&gt;B,30/01/2019&lt;BR /&gt;];&lt;/P&gt;</description>
      <pubDate>Tue, 05 Feb 2019 12:32:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grouping-Ranges-of-dates-together/m-p/1539619#M439357</guid>
      <dc:creator>pradosh_thakur</dc:creator>
      <dc:date>2019-02-05T12:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping Ranges of dates together</title>
      <link>https://community.qlik.com/t5/QlikView/Grouping-Ranges-of-dates-together/m-p/1539622#M439358</link>
      <description>now jsut use the max(occur) as the expression and it will give you the occurence</description>
      <pubDate>Tue, 05 Feb 2019 12:33:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grouping-Ranges-of-dates-together/m-p/1539622#M439358</guid>
      <dc:creator>pradosh_thakur</dc:creator>
      <dc:date>2019-02-05T12:33:26Z</dc:date>
    </item>
  </channel>
</rss>

