<?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: Create one record for each date between two dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Create-one-record-for-each-date-between-two-dates/m-p/2009749#M1221707</link>
    <description>&lt;P&gt;Is there a possibility to have the same result per hour of the day? i'm trying to count&amp;nbsp; all the people that has been inside a place. My tabel structure is same as above, but switch aircraft and type with person and place.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Nov 2022 13:27:50 GMT</pubDate>
    <dc:creator>samim</dc:creator>
    <dc:date>2022-11-28T13:27:50Z</dc:date>
    <item>
      <title>Create one record for each date between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Create-one-record-for-each-date-between-two-dates/m-p/968508#M331804</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'm trying to visualize the actual useage of a machine on a calendar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table with the events (fligths). This table holds all the flights (completed or scheduled) and also reservations for given periods. This table as a Start and End Date (in DateTime format). Besides each event, I have the type of event (four possible types: Reserved, Scheduled, Completed, Maintenance).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Aircraft&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Date Start&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Date End&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Type&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;etc.&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;8.12.15 10:00&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;11.12.15 17:00&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Maintenance&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1.12.15 14:27&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1.12.15 17:29&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Completed&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;30.11.15 04:25&lt;/TD&gt;&lt;TD&gt;30.11.15 8:50&lt;/TD&gt;&lt;TD&gt;Completed&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;20.12.15 22:45&lt;/TD&gt;&lt;TD&gt;21.12.15 02:30&lt;/TD&gt;&lt;TD&gt;Reserved&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I would like to create a table that has one record per aircraft, date and type. So if aircraft A has a maintenance event from 8.12. to 11.12., I would like to have the records like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="75" style="border: 1px solid rgb(0, 0, 0); width: 297px; height: 70px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Date&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Aircraft&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Type&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;8.12.&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Maintenance&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;9.12.&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Maintenance&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10.12.&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;Maintenance&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11.12.&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;Maintenance&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20.12.&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;Reserved&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;21.12.&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;Reserved&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;30.11.&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;Completed&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the IntervalMatch, but with no success.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I load the data to have a record for each day?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Nov 2015 03:54:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-one-record-for-each-date-between-two-dates/m-p/968508#M331804</guid>
      <dc:creator />
      <dc:date>2015-11-24T03:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: Create one record for each date between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Create-one-record-for-each-date-between-two-dates/m-p/968509#M331805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do this with a preceding load with an iterator:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Aircraft, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Type,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Date(Start + IterNo() - 1) As Date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;While Start + IterNo() - 1 &amp;lt;= End&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD Aircraft, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Date(Floor(Timestamp#(Start, 'd.MM.yyyy hh:mm'))) As Start,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Date(Floor(Timestamp#(End, 'd.MM.yyyy hh:mm'))) As End,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Type&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Inline&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;[&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Aircraft, Start, End, Type&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; A, 8.12.15 10:00, 11.12.15 17:00, Maintenance&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; A, 1.12.15 14:27, 1.12.15 17:29, Completed&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; B, 30.11.15 04:25, 30.11.15 8:50, Completed&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; A, 20.12.15 22:45, 21.12.15 02:30, Reserved&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Replace the italic portion with your actual load.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;IMG alt="t1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/106539_t1.png" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Nov 2015 05:56:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-one-record-for-each-date-between-two-dates/m-p/968509#M331805</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-11-24T05:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: Create one record for each date between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Create-one-record-for-each-date-between-two-dates/m-p/968510#M331806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome, thank you very much. That worked perfectly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Nov 2015 06:08:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-one-record-for-each-date-between-two-dates/m-p/968510#M331806</guid>
      <dc:creator />
      <dc:date>2015-11-24T06:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: Create one record for each date between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Create-one-record-for-each-date-between-two-dates/m-p/968511#M331807</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;You can try this by using WHILE like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; Aircraft,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Type,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Date(Start + IterNo() - 1) As Date&lt;/P&gt;&lt;P&gt;While Start + IterNo() - 1 &amp;lt;= End&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;LOAD Aircraft,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Date(Floor(Timestamp#(Start, 'D.MM.YY hh:mm'))) As Start,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Date(Floor(Timestamp#(End, 'D.MM.YY hh:mm'))) As End,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Type&lt;/P&gt;&lt;P&gt;Inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;&amp;nbsp; Aircraft, Start, End, Type&lt;/P&gt;&lt;P&gt;&amp;nbsp; A, 8.12.15 10:00, 11.12.15 17:00, Maintenance&lt;/P&gt;&lt;P&gt;&amp;nbsp; A, 1.12.15 14:27, 1.12.15 17:29, Completed&lt;/P&gt;&lt;P&gt;&amp;nbsp; B, 30.11.15 04:25, 30.11.15 8:50, Completed&lt;/P&gt;&lt;P&gt;&amp;nbsp; A, 20.12.15 22:45, 21.12.15 02:30, Reserved&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Nov 2015 06:10:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-one-record-for-each-date-between-two-dates/m-p/968511#M331807</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2015-11-24T06:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: Create one record for each date between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Create-one-record-for-each-date-between-two-dates/m-p/1691789#M450662</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you from 2020!&amp;nbsp;&lt;/P&gt;&lt;P&gt;How might I alter this to get one row for each Month between the start and end dates? I have time periods that are 3 to 12 months and I need to end up with one row for each month.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 07 Apr 2020 20:51:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-one-record-for-each-date-between-two-dates/m-p/1691789#M450662</guid>
      <dc:creator>dena_reavis</dc:creator>
      <dc:date>2020-04-07T20:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: Create one record for each date between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Create-one-record-for-each-date-between-two-dates/m-p/1691981#M450688</link>
      <description>&lt;P&gt;I tried a few things and thanks to this post and one by &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6148"&gt;@rwunderlich&lt;/a&gt;&amp;nbsp; on &lt;A href="https://community.qlik.com/t5/QlikView-Creating-Analytics/How-Do-I-Get-the-Number-of-Months-Between-Two-Dates/td-p/296928" target="_self"&gt;getting the number of months between two dates ,&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I was able to work this out, solving my issue where deliveries may be contracted as "quantities to be delivered" over the few months between the start and end dates. For analysis purposes I need to assume the full quantity would fall evenly over the months :&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;LOAD&lt;BR /&gt;Aircraft,&lt;BR /&gt;Quantity as Full_Quantity,&lt;BR /&gt;Quantity/(Months_Between+1) as Monthly_Quantity,&lt;BR /&gt;Months_Between+1 as Months_Between,&lt;BR /&gt;Start,&lt;BR /&gt;End,&lt;BR /&gt;IterNo() as Iteration,&lt;BR /&gt;Date(AddMonths(Start, IterNo() - 1)) As Delivery_Month&lt;BR /&gt;While MonthStart + IterNo() - 1 &amp;lt;= MonthEnd&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;LOAD Aircraft,&lt;BR /&gt;((year(Start)*12)+month(Start)) As MonthStart,&lt;BR /&gt;((year(End)*12)+month(End)) As MonthEnd,&lt;BR /&gt;Start,&lt;BR /&gt;End,&lt;BR /&gt;((year(End)*12)+month(End)) - ((year(Start)*12)+month(Start)) as Months_Between,&lt;BR /&gt;Quantity&lt;BR /&gt;Inline&lt;BR /&gt;[&lt;BR /&gt;Aircraft, Start, End, Quantity&lt;BR /&gt;A, 04/01/2020, 06/30/2020, 500&lt;BR /&gt;A, 04/01/2020, 05/30/2020, 600&lt;BR /&gt;B, 04/01/2020, 06/30/2020, 900&lt;BR /&gt;A, 04/01/2020, 07/30/2020, 1200&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Qlik Community is the best! Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 08 Apr 2020 12:18:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-one-record-for-each-date-between-two-dates/m-p/1691981#M450688</guid>
      <dc:creator>dena_reavis</dc:creator>
      <dc:date>2020-04-08T12:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: Create one record for each date between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Create-one-record-for-each-date-between-two-dates/m-p/2009749#M1221707</link>
      <description>&lt;P&gt;Is there a possibility to have the same result per hour of the day? i'm trying to count&amp;nbsp; all the people that has been inside a place. My tabel structure is same as above, but switch aircraft and type with person and place.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 13:27:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-one-record-for-each-date-between-two-dates/m-p/2009749#M1221707</guid>
      <dc:creator>samim</dc:creator>
      <dc:date>2022-11-28T13:27:50Z</dc:date>
    </item>
  </channel>
</rss>

