<?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: Serious set analysis using date fields....I think. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Serious-set-analysis-using-date-fields-I-think/m-p/324944#M497106</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is very helpful! Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can imagine, it will take a little time to try and implement this. My only concern is that I have something on the order of 80K enrollment records. I think the avg number of days a student is enrolled is close to 200 days. That's like 16million rows if I did a day by day approach like you have done. this is considerably more processesing than the combination of all my other tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe I can try to modify it to work on a month by month basis and not day by day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Either way, thanks for the idea! And some set analysis that works and is related to my topic!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Wes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Nov 2011 21:33:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-11-16T21:33:24Z</dc:date>
    <item>
      <title>Serious set analysis using date fields....I think.</title>
      <link>https://community.qlik.com/t5/QlikView/Serious-set-analysis-using-date-fields-I-think/m-p/324942#M497104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Qlikview Community!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need some help with a specific dataset I'm trying to grab. I am in the education sector where my data belongs to Students that belong to Math Tutoring Centers. (I'm pulling data at the HQ level for all centers)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an "Enrollments" table that has the following columns:&lt;/P&gt;&lt;P&gt;Id, StudentId, StartDate, EndDate, EnrollmentType [plus a lot more data that I don't care about in this question.]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to count the # of enrollments based on a "month year" from a Master Calendar that has been populated with all the dates I care about.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So basically, I want to be able to click on a value in the field CalendarMonthAndYear (currently in a listbox) and then give me a snapshot of the # of enrollments for that month.You would define "an enrollment" for the month by: StartDate&amp;lt;=MonthEnd(CalendarMonthAndYear) AND EndDate&amp;gt;= MonthEnd(CalendarMonthAndYear).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is possible for the students to have multiple concurrent enrollments with different EnrollmentTypes. If this is the case, It would be optimal to only care about the student having at least 1 active/valid enrollment, not that they have two different enrollments for that month. However, it isn't vital that we count them once instead of twice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To make this a little harder, the StudentId on the Enrollments table has a relationship with a Students Table which has a relationship with a Center table. So I really want a snapshot aggregated by the center. My dataset would be something like this if you clicked "May 2005"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 25%; border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;CenterName&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Enrollments&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;CenterName1&lt;/TD&gt;&lt;TD&gt;53&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;CenterName2&lt;/TD&gt;&lt;TD&gt;134&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;CenterName3&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;etc...&lt;/TD&gt;&lt;TD&gt;etc...&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(this would mean that CenterName1 had 53 students with an enrollment record with a start date &amp;lt;= 5/31/2005 and an end date &amp;gt;= 5/31/2005 while centerName2 has 134 students under the same criteria.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've literally tried 10 different approaches to this problem. I've tried to think of a way in the load script to ease things, I've tried my limited knowledge of set analysis to no avail... If anyone could suggest a plan of action, it'd be much appreciated. I am familiar with the AGGR function and use it regularly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!!!&lt;/P&gt;&lt;P&gt;-Wes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 17:03:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Serious-set-analysis-using-date-fields-I-think/m-p/324942#M497104</guid>
      <dc:creator />
      <dc:date>2011-11-16T17:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: Serious set analysis using date fields....I think.</title>
      <link>https://community.qlik.com/t5/QlikView/Serious-set-analysis-using-date-fields-I-think/m-p/324943#M497105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Attached is an example of counting employees by year given their hire and fire dates.&amp;nbsp; That seems like the same thing as counting students by month given their start and end dates.&amp;nbsp; There are several variations on the theme included.&amp;nbsp; I realize your situation is a little more complicated than this.&amp;nbsp; If you can't figure out how to adapt it, let me know, and I'll look more closely at your specific problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 19:40:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Serious-set-analysis-using-date-fields-I-think/m-p/324943#M497105</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-11-16T19:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: Serious set analysis using date fields....I think.</title>
      <link>https://community.qlik.com/t5/QlikView/Serious-set-analysis-using-date-fields-I-think/m-p/324944#M497106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is very helpful! Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can imagine, it will take a little time to try and implement this. My only concern is that I have something on the order of 80K enrollment records. I think the avg number of days a student is enrolled is close to 200 days. That's like 16million rows if I did a day by day approach like you have done. this is considerably more processesing than the combination of all my other tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe I can try to modify it to work on a month by month basis and not day by day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Either way, thanks for the idea! And some set analysis that works and is related to my topic!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Wes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 21:33:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Serious-set-analysis-using-date-fields-I-think/m-p/324944#M497106</guid>
      <dc:creator />
      <dc:date>2011-11-16T21:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: Serious set analysis using date fields....I think.</title>
      <link>https://community.qlik.com/t5/QlikView/Serious-set-analysis-using-date-fields-I-think/m-p/324945#M497107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Month by month should do the trick.&amp;nbsp; Our biggest application has a table kind of like this with 65 million rows on it, but it's best to avoid that sort of thing if you can.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 22:43:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Serious-set-analysis-using-date-fields-I-think/m-p/324945#M497107</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-11-16T22:43:43Z</dc:date>
    </item>
  </channel>
</rss>

