<?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 Intervalmatch and COUNT in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Intervalmatch-and-COUNT-in-script/m-p/454472#M1156587</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 have the following script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LET&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;vDateMin&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Num&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;MakeDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(1998,1,1)); &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LET&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;vDateMax&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Floor&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;YearEnd&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AddMonths&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Today&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(), 12))); &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LET&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;vDateToday&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Num&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Today&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;()); &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LET&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;varYear&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;year&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;today&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;());&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LET&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;varMonth&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;= &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;today&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;());&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;TempCalendar: &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LOAD&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;$(vDateMin)&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; + &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;RowNo&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;() - 1 &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;DateNumber&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;$(vDateMin)&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; + &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;RowNo&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;() - 1) &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TempDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AUTOGENERATE&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; 1 &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;WHILE&lt;/SPAN&gt; &lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;$(vDateMin)&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;+&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;IterNo&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;()-1&amp;lt;= &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;$(vDateMax)&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;; &lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;MasterCalendar: &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LOAD&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TempDate&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;CalendarDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Day&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TempDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;CalendarDay&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;WeekDay&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TempDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;CalendarWeekDay&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Week&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TempDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;CalendarWeek&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TempDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;CalendarMonth&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TempDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;CalendarYear&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Q' &amp;amp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Ceil&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TempDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;)/3) &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;CalendarQuarter&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;WeekDay&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TempDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;) &amp;amp; '-' &amp;amp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TempDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;CalendarWeekAndYear&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TempDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;) &amp;amp; '-' &amp;amp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TempDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;CalendarMonthAndYear&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; TempCalendar &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;ORDER&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;BY&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TempDate&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;ASC&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;; &lt;BR /&gt;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;DROP&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;TABLE&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; TempCalendar; &lt;BR /&gt;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LET&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;vDateMin&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Num&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;MakeDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(1998,1,1)); &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LET&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;vDateMax&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Floor&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;YearEnd&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AddMonths&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Today&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(), 12))); &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LET&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;vDateToday&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Num&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Today&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;());&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LET&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;varYear&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;today&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;());&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LET&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;varMonth&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;= &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;today&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;());&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;SET&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;vCY&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = Year(Today()); &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;TempSickData:&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LOAD&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;ID_PER&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;ID_ZKT&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;date&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;DATIZIEK&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;,'DD-MM-YYYY') &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;DATIZIEK&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;date&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;DATEZIEK&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;,'DD-MM-YYYY') &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;DATEZIEK&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;;&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;SQL&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; SELECT *&lt;BR /&gt;FROM PRODPIM."PIM_TZKT";&lt;BR /&gt;&lt;BR /&gt;SickData:&lt;BR /&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;noconcatenate&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;load&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; MasterCalendar;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;inner&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;join&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(SickData) &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;IntervalMatch&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;CalendarDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;load&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;DATIZIEK&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;DATEZIEK&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; TempSickData; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;inner&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;join&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;load&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; TempSickData;&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;drop&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;table&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; TempSickData;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;Im doing an intervalmatch withe the two date fields (DATIZIEK and DATEZIEK) and my mastercalendar. When i click on a value from ID_PER (the person key) multiple fields in the CalendarDate column are selected. I want add a colum that counts these fields.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;Can i do this in my script?&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Feb 2013 13:19:03 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-02-20T13:19:03Z</dc:date>
    <item>
      <title>Intervalmatch and COUNT in script</title>
      <link>https://community.qlik.com/t5/QlikView/Intervalmatch-and-COUNT-in-script/m-p/454472#M1156587</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 have the following script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LET&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;vDateMin&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Num&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;MakeDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(1998,1,1)); &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LET&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;vDateMax&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Floor&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;YearEnd&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AddMonths&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Today&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(), 12))); &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LET&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;vDateToday&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Num&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Today&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;()); &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LET&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;varYear&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;year&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;today&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;());&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LET&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;varMonth&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;= &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;today&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;());&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;TempCalendar: &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LOAD&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;$(vDateMin)&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; + &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;RowNo&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;() - 1 &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;DateNumber&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;$(vDateMin)&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; + &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;RowNo&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;() - 1) &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TempDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AUTOGENERATE&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; 1 &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;WHILE&lt;/SPAN&gt; &lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;$(vDateMin)&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;+&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;IterNo&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;()-1&amp;lt;= &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;$(vDateMax)&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;; &lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;MasterCalendar: &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LOAD&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TempDate&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;CalendarDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Day&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TempDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;CalendarDay&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;WeekDay&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TempDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;CalendarWeekDay&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Week&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TempDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;CalendarWeek&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TempDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;CalendarMonth&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TempDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;CalendarYear&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Q' &amp;amp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Ceil&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TempDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;)/3) &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;CalendarQuarter&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;WeekDay&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TempDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;) &amp;amp; '-' &amp;amp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TempDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;CalendarWeekAndYear&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TempDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;) &amp;amp; '-' &amp;amp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TempDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AS&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;CalendarMonthAndYear&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; TempCalendar &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;ORDER&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;BY&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TempDate&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;ASC&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;; &lt;BR /&gt;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;DROP&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;TABLE&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; TempCalendar; &lt;BR /&gt;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LET&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;vDateMin&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Num&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;MakeDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(1998,1,1)); &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LET&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;vDateMax&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Floor&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;YearEnd&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;AddMonths&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Today&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(), 12))); &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LET&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;vDateToday&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Num&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Today&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;());&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LET&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;varYear&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;today&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;());&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LET&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;varMonth&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;= &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;today&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;());&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;SET&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: gray; font-size: 9pt;"&gt;vCY&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = Year(Today()); &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;TempSickData:&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LOAD&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;ID_PER&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;ID_ZKT&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;date&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;DATIZIEK&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;,'DD-MM-YYYY') &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;DATIZIEK&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;date&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;DATEZIEK&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;,'DD-MM-YYYY') &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;DATEZIEK&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;;&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;SQL&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; SELECT *&lt;BR /&gt;FROM PRODPIM."PIM_TZKT";&lt;BR /&gt;&lt;BR /&gt;SickData:&lt;BR /&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;noconcatenate&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;load&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; MasterCalendar;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;inner&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;join&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(SickData) &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;IntervalMatch&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;CalendarDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;load&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;DATIZIEK&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;DATEZIEK&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; TempSickData; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;inner&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;join&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;load&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; TempSickData;&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;drop&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;table&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; TempSickData;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;Im doing an intervalmatch withe the two date fields (DATIZIEK and DATEZIEK) and my mastercalendar. When i click on a value from ID_PER (the person key) multiple fields in the CalendarDate column are selected. I want add a colum that counts these fields.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;Can i do this in my script?&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2013 13:19:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Intervalmatch-and-COUNT-in-script/m-p/454472#M1156587</guid>
      <dc:creator />
      <dc:date>2013-02-20T13:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: Intervalmatch and COUNT in script</title>
      <link>https://community.qlik.com/t5/QlikView/Intervalmatch-and-COUNT-in-script/m-p/454473#M1156588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;Why you need so much logic for this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;Try this :&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;LET vDateMin = Num(MakeDate(1998,1,1)); LET vDateMax = Floor(YearEnd(AddMonths(Today(), 12))); LET vDateToday = Num(Today()); LET varYear = year(today());LET varMonth= Month(today());&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;TempCalendar: LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp; $(vDateMin) + RowNo() - 1 AS DateNumber, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp; Date($(vDateMin) + RowNo() - 1) AS TempDate AUTOGENERATE 1 WHILE $(vDateMin)+IterNo()-1&amp;lt;= $(vDateMax); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;MasterCalendar: LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TempDate AS CalendarDate, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Day(TempDate) AS CalendarDay, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WeekDay(TempDate) AS CalendarWeekDay, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Week(TempDate) AS CalendarWeek, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(TempDate) AS CalendarMonth, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(TempDate) AS CalendarYear, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Q' &amp;amp; Ceil(Month(TempDate)/3) AS CalendarQuarter, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WeekDay(TempDate) &amp;amp; '-' &amp;amp; Year(TempDate) AS CalendarWeekAndYear, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(TempDate) &amp;amp; '-' &amp;amp; Year(TempDate) AS CalendarMonthAndYear RESIDENT TempCalendar ORDER BY TempDate ASC; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;DROP TABLE TempCalendar;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp; LET vDateMin = Num(MakeDate(1998,1,1)); LET vDateMax = Floor(YearEnd(AddMonths(Today(), 12))); LET vDateToday = Num(Today());LET varYear = Year(today());LET varMonth= Month(today());SET vCY = Year(Today());&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;SickData:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;LOAD ID_PER, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID_ZKT, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(DATIZIEK,'DD-MM-YYYY') as DATIZIEK, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(DATEZIEK,'DD-MM-YYYY') as DATEZIEK&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;SQL SELECT *&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;FROM PRODPIM."PIM_TZKT";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;Left Join(SickData)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;IntervalMatch(CalendarDate) load DATIZIEK, DATEZIEK Resident SickData;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;- Now it will link calender table with calendarDate.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;- If you add your dim as ID_ZKT &amp;amp; expr as count(CalendarDate), you can see your result.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;Hope it helps you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;Cheers!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;Jagan&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2013 13:32:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Intervalmatch-and-COUNT-in-script/m-p/454473#M1156588</guid>
      <dc:creator>jagannalla</dc:creator>
      <dc:date>2013-02-20T13:32:22Z</dc:date>
    </item>
  </channel>
</rss>

