<?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 Complex Count in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Complex-Count/m-p/2053254#M1223064</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I have a table that looks something like below:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;EmpID, LocationID,PositionID,StartDate,EndDate&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1, A, 3, 1/23/2022, 3/5/2022&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1, B, 3, 3/5/2022, -&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2, A, 3, 7/14/2022, 12/01/2022&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2, A, 1, 12/01/2022, 12/30/2022&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3, A, 3, 4/17/2022, 6/03/2022&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3, A, 3, 6/03/2022, -&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I am trying to count distinct Employee IDs (EmpID) that have a valid EndDate in a given month, e.g.:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;Employee 1 has a valid EndDate in March 2022 (as the Employee changes location), so the Employee should be counted in March 2022.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Employee 2 has two valid end dates in December 2022 as the Employee changes positions on 12/01/2022 and then leaves the company on 12/30/2022. Employee 2 should be counted only once for December 2022.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Employee 3 does NOT have a valid EndDate. The user was EndDated on 6/03/2022 but then re-started on the same day with the same Location and Position. If the Employee has an EndDate and a StartDate on the same day where neither the Position or the Location changes, then they should not be counted for that month. Employee 3 should NOT be counted in June 2022.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;Assume Employees can only hold one Position at a time and can be located at only one Location at at time.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Does anyone have ideas on how to approach this problem?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 26 Mar 2023 19:04:55 GMT</pubDate>
    <dc:creator>Germa</dc:creator>
    <dc:date>2023-03-26T19:04:55Z</dc:date>
    <item>
      <title>Complex Count</title>
      <link>https://community.qlik.com/t5/QlikView/Complex-Count/m-p/2053254#M1223064</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I have a table that looks something like below:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;EmpID, LocationID,PositionID,StartDate,EndDate&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1, A, 3, 1/23/2022, 3/5/2022&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1, B, 3, 3/5/2022, -&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2, A, 3, 7/14/2022, 12/01/2022&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2, A, 1, 12/01/2022, 12/30/2022&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3, A, 3, 4/17/2022, 6/03/2022&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3, A, 3, 6/03/2022, -&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I am trying to count distinct Employee IDs (EmpID) that have a valid EndDate in a given month, e.g.:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;Employee 1 has a valid EndDate in March 2022 (as the Employee changes location), so the Employee should be counted in March 2022.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Employee 2 has two valid end dates in December 2022 as the Employee changes positions on 12/01/2022 and then leaves the company on 12/30/2022. Employee 2 should be counted only once for December 2022.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Employee 3 does NOT have a valid EndDate. The user was EndDated on 6/03/2022 but then re-started on the same day with the same Location and Position. If the Employee has an EndDate and a StartDate on the same day where neither the Position or the Location changes, then they should not be counted for that month. Employee 3 should NOT be counted in June 2022.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;Assume Employees can only hold one Position at a time and can be located at only one Location at at time.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Does anyone have ideas on how to approach this problem?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Mar 2023 19:04:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complex-Count/m-p/2053254#M1223064</guid>
      <dc:creator>Germa</dc:creator>
      <dc:date>2023-03-26T19:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Complex Count</title>
      <link>https://community.qlik.com/t5/QlikView/Complex-Count/m-p/2053405#M1223074</link>
      <description>&lt;P&gt;You need to resolve your start/end-dates to single dates and linking it to a master-calendar. A missing end-date could be replaced by today() or similar. For this you could use an&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Design/IntervalMatch/ba-p/1464547" target="_blank"&gt;IntervalMatch - Qlik Community - 1464547&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 07:29:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complex-Count/m-p/2053405#M1223074</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2023-03-27T07:29:25Z</dc:date>
    </item>
  </channel>
</rss>

