<?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: Range Avg headcount question with set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Range-Avg-headcount-question-with-set-analysis/m-p/346073#M578518</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok I put a sample together. I want the left table to be "Locked" to selection of the month and year, but not to company. the right table is free to be altered by the date selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help Please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Mar 2012 21:16:32 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-03-09T21:16:32Z</dc:date>
    <item>
      <title>Range Avg headcount question with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Range-Avg-headcount-question-with-set-analysis/m-p/346072#M578517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;New Question regarding headcount. How can I enter the set analysis {&amp;lt;CalendarMonthAndYear=,CalendarMonthEnd=,CalendarMonthName=,CalendarYear=&amp;gt;} into the below formula and still have it work? The hire and inactive dates are not directly tied to the calendar. The dimension here is Monthand Year Descending. I tried inserting it after the sum but that did not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rangeavg( Below (&lt;/P&gt;&lt;P&gt; sum(aggr((if(CalendarMonthEnd&amp;gt;=[Hire Date] and CalendarMonthEnd &amp;lt;=if(isnull([Inactive Date]),monthend([Active Date]),MonthEnd([Inactive Date])),1,0)),CalendarMonthEnd,EmployeeHead ))&lt;/P&gt;&lt;P&gt;,0,12) )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The previous expression work well, just needed to go with a new approach to get the headcount:&lt;/P&gt;&lt;P&gt;Rangeavg( Below (count({&amp;lt;CalendarMonthAndYear=,CalendarMonthEnd=,CalendarMonthName=,CalendarYear=&amp;gt;}DISTINCT Employee),0,12) )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rangeavg(&lt;/P&gt;&lt;P&gt;Below(&lt;/P&gt;&lt;P&gt;sum({&amp;lt;CalendarMonthAndYear=,CalendarMonthEnd=,CalendarMonthName=,CalendarYear=&amp;gt;}&lt;/P&gt;&lt;P&gt;aggr(count({&amp;lt;CalendarMonthAndYear=,CalendarMonthEnd=,CalendarMonthName=,CalendarYear=&amp;gt;}DISTINCT if(CalendarMonthAndYear&amp;gt;=[Hire Date] and CalendarMonthAndYear &amp;lt;=monthend([Active Date]),EmployeeHead)),CalendarMonthAndYear,EmployeeHead)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;,0,12)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Mar 2012 19:15:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Range-Avg-headcount-question-with-set-analysis/m-p/346072#M578517</guid>
      <dc:creator />
      <dc:date>2012-03-09T19:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: Range Avg headcount question with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Range-Avg-headcount-question-with-set-analysis/m-p/346073#M578518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok I put a sample together. I want the left table to be "Locked" to selection of the month and year, but not to company. the right table is free to be altered by the date selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help Please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Mar 2012 21:16:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Range-Avg-headcount-question-with-set-analysis/m-p/346073#M578518</guid>
      <dc:creator />
      <dc:date>2012-03-09T21:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Range Avg headcount question with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Range-Avg-headcount-question-with-set-analysis/m-p/346074#M578519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anyone?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2012 12:06:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Range-Avg-headcount-question-with-set-analysis/m-p/346074#M578519</guid>
      <dc:creator />
      <dc:date>2012-03-12T12:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: Range Avg headcount question with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Range-Avg-headcount-question-with-set-analysis/m-p/346075#M578520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried this but it just returns 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rangeavg( Below (sum(aggr(&lt;/P&gt;&lt;P&gt;count({$&amp;lt;CalendarMonthEnd={'&amp;gt;=([Hire Date] ) &amp;lt;=$(if(Headstatus='A',monthend([Active Date]),MonthEnd([Inactive Date])))'}&amp;gt;}&lt;/P&gt;&lt;P&gt; DISTINCT EmployeeHead),CalendarMonthEnd,EmployeeHead )),0,12) )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2012 13:49:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Range-Avg-headcount-question-with-set-analysis/m-p/346075#M578520</guid>
      <dc:creator />
      <dc:date>2012-03-12T13:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Range Avg headcount question with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Range-Avg-headcount-question-with-set-analysis/m-p/346076#M578521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does anyone have any other ideas on getting a headcount based on my example where I can restrict selection based on set analysis?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am lost on what to do.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2012 19:28:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Range-Avg-headcount-question-with-set-analysis/m-p/346076#M578521</guid>
      <dc:creator />
      <dc:date>2012-03-12T19:28:19Z</dc:date>
    </item>
  </channel>
</rss>

