<?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: Expand table between from-to dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expand-table-between-from-to-dates/m-p/1370774#M419012</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Plants_Temp:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * INLINE [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Id, Plants, StartDate, Location&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1, 502,2015-10-22, 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2, 585,2015-12-01, 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3, 668,2016-01-01, 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4, 760,2016-04-01, 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;5,&amp;nbsp; 713,2016-06-15, 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;6, 713,2016-06-20, 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;7, 668,2017-02-01, 3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NoConcatenate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Plants_Temp2:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Plants_Temp order by Location, StartDate desc;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table Plants_Temp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Plants:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NoConcatenate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;&amp;nbsp; Date(StartDate + IterNo() - 1) as Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;While StartDate + IterNo() - 1 &amp;lt;= EndDate;&lt;/STRONG&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;&amp;nbsp;&amp;nbsp; Date(if(Location=previous(Location),previous(StartDate),now()),'DD-MM-YYYY') as EndDate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Plants_Temp2;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table Plants_Temp2&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Apr 2017 13:09:41 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2017-04-10T13:09:41Z</dc:date>
    <item>
      <title>Expand table between from-to dates</title>
      <link>https://community.qlik.com/t5/QlikView/Expand-table-between-from-to-dates/m-p/1370773#M419011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, can anybody help me out on this one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like the table you see int the attachment be expanded (via script!) with:&lt;/P&gt;&lt;P&gt;for every Location should be a record between his StartDate and Endate, and Plants filled with the corresponding number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;For the first record I should have an extra amount of records (days between EndDate and StartDate) with Plants=502&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Apr 2017 13:04:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expand-table-between-from-to-dates/m-p/1370773#M419011</guid>
      <dc:creator>bartvanwetten</dc:creator>
      <dc:date>2017-04-10T13:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Expand table between from-to dates</title>
      <link>https://community.qlik.com/t5/QlikView/Expand-table-between-from-to-dates/m-p/1370774#M419012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Plants_Temp:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * INLINE [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Id, Plants, StartDate, Location&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1, 502,2015-10-22, 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2, 585,2015-12-01, 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3, 668,2016-01-01, 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4, 760,2016-04-01, 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;5,&amp;nbsp; 713,2016-06-15, 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;6, 713,2016-06-20, 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;7, 668,2017-02-01, 3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NoConcatenate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Plants_Temp2:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Plants_Temp order by Location, StartDate desc;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table Plants_Temp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Plants:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NoConcatenate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;&amp;nbsp; Date(StartDate + IterNo() - 1) as Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;While StartDate + IterNo() - 1 &amp;lt;= EndDate;&lt;/STRONG&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;&amp;nbsp;&amp;nbsp; Date(if(Location=previous(Location),previous(StartDate),now()),'DD-MM-YYYY') as EndDate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Plants_Temp2;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table Plants_Temp2&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Apr 2017 13:09:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expand-table-between-from-to-dates/m-p/1370774#M419012</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-04-10T13:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: Expand table between from-to dates</title>
      <link>https://community.qlik.com/t5/QlikView/Expand-table-between-from-to-dates/m-p/1370775#M419013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;You create a calendar and use IntervalMatch function to generate the dates and values,&lt;/P&gt;&lt;P&gt;Use the below script after your script statement and see the result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MinMaxDate:&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;min(StartDate) AS MinDate,&lt;/P&gt;&lt;P&gt;Max(EndDate) AS MaxDate&lt;/P&gt;&lt;P&gt;Resident Plants;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calendar:&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;Date(MinDate+IterNo()-1) AS Date&lt;/P&gt;&lt;P&gt;Resident MinMaxDate&lt;/P&gt;&lt;P&gt;while MinDate+IterNo()-1&amp;lt;=MaxDate;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table MinMaxDate;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IntervalMatch (Date) LOAD StartDate, EndDate Resident Plants;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Apr 2017 13:19:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expand-table-between-from-to-dates/m-p/1370775#M419013</guid>
      <dc:creator>malini_qlikview</dc:creator>
      <dc:date>2017-04-10T13:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: Expand table between from-to dates</title>
      <link>https://community.qlik.com/t5/QlikView/Expand-table-between-from-to-dates/m-p/1370776#M419014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in 10 minutes man! Are there moment you don't spend with Qlik?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers mate!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bart&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2017 07:23:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expand-table-between-from-to-dates/m-p/1370776#M419014</guid>
      <dc:creator>bartvanwetten</dc:creator>
      <dc:date>2017-04-12T07:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: Expand table between from-to dates</title>
      <link>https://community.qlik.com/t5/QlikView/Expand-table-between-from-to-dates/m-p/1370777#M419015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanx for your input Malini!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2017 07:28:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expand-table-between-from-to-dates/m-p/1370777#M419015</guid>
      <dc:creator>bartvanwetten</dc:creator>
      <dc:date>2017-04-12T07:28:32Z</dc:date>
    </item>
  </channel>
</rss>

