<?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 rows in a script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Create-rows-in-a-script/m-p/505272#M188914</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Concatenate a record to your Temp2 table before loading result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate(Temp2)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; today() as &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;NextDate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;autogenerate 1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Sep 2013 14:46:00 GMT</pubDate>
    <dc:creator>Clever_Anjos</dc:creator>
    <dc:date>2013-09-10T14:46:00Z</dc:date>
    <item>
      <title>Create rows in a script</title>
      <link>https://community.qlik.com/t5/QlikView/Create-rows-in-a-script/m-p/505271#M188913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi There&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently using the script below to populate dates between a slowly changing dimension to determine whether a container is hired out or available.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp2:&lt;/P&gt;&lt;P&gt;load *, if(previous(Unit)=Unit, previous([Movement Date]),[Movement Date]+1) as NextDate&lt;/P&gt;&lt;P&gt;Resident Movement&lt;/P&gt;&lt;P&gt;order by Unit, [Movement Date] desc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table Movement;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;load Unit, date([Movement Date] + IterNo() -1) as [Movement Date],&amp;nbsp; [Available/On-Hire]&lt;/P&gt;&lt;P&gt;Resident Temp2&lt;/P&gt;&lt;P&gt;while [Movement Date] + IterNo() - 1 &amp;lt; NextDate&lt;/P&gt;&lt;P&gt;order by Unit, [Movement Date];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This has successfully created a row for each date between the first movement date and the last movement date. However I now need to create rows between the last movement date up until today's date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anybody has any ideas or advice on how to do this then it would be much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steven&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 14:41:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-rows-in-a-script/m-p/505271#M188913</guid>
      <dc:creator />
      <dc:date>2013-09-10T14:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: Create rows in a script</title>
      <link>https://community.qlik.com/t5/QlikView/Create-rows-in-a-script/m-p/505272#M188914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Concatenate a record to your Temp2 table before loading result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate(Temp2)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; today() as &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;NextDate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;autogenerate 1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 14:46:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-rows-in-a-script/m-p/505272#M188914</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2013-09-10T14:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create rows in a script</title>
      <link>https://community.qlik.com/t5/QlikView/Create-rows-in-a-script/m-p/505273#M188915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would use a join and a peek() as described in &lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/02/05/populating-a-sparsely-populated-field"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2013/02/05/populating-a-sparsely-populated-field&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 02:09:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-rows-in-a-script/m-p/505273#M188915</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2013-09-11T02:09:06Z</dc:date>
    </item>
  </channel>
</rss>

