<?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 Split dates from and to in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Split-dates-from-and-to/m-p/1141669#M373958</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 two dates in the data model&lt;/P&gt;&lt;P&gt;consider&lt;/P&gt;&lt;P&gt;ID,start_date,end_date,Value&lt;/P&gt;&lt;P&gt;1,01/02/2016,31/12/9999,10&lt;/P&gt;&lt;P&gt;2,01/03/2016,31/12/9999,25&lt;/P&gt;&lt;P&gt;3,01/01/2016,31/01/2016,5&lt;/P&gt;&lt;P&gt;4,01/02/2016,30/04/2016,30&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to split the start date and end date as&lt;/P&gt;&lt;P&gt;if you consider ID 1, i want the output date as&lt;/P&gt;&lt;P&gt;ID,start_date,end_date,Value&lt;/P&gt;&lt;P&gt;1,01/02/2016,29/02/2016,10&lt;/P&gt;&lt;P&gt;1,01/03/2016,31/03/2016,10&lt;/P&gt;&lt;P&gt;1,01/04/2016,30/04/2016,10&lt;/P&gt;&lt;P&gt;1,01/05/2016,31/12/9999,10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data is available till May Month(01/05/2016), So the end date for may month should come as 31/12/9999 to indicate it is the current data. Similarly it should split dates for all the ID's.&lt;/P&gt;&lt;P&gt;How can we achieve this split dates?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Jun 2016 11:18:07 GMT</pubDate>
    <dc:creator>udaya_kumar</dc:creator>
    <dc:date>2016-06-17T11:18:07Z</dc:date>
    <item>
      <title>Split dates from and to</title>
      <link>https://community.qlik.com/t5/QlikView/Split-dates-from-and-to/m-p/1141669#M373958</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 two dates in the data model&lt;/P&gt;&lt;P&gt;consider&lt;/P&gt;&lt;P&gt;ID,start_date,end_date,Value&lt;/P&gt;&lt;P&gt;1,01/02/2016,31/12/9999,10&lt;/P&gt;&lt;P&gt;2,01/03/2016,31/12/9999,25&lt;/P&gt;&lt;P&gt;3,01/01/2016,31/01/2016,5&lt;/P&gt;&lt;P&gt;4,01/02/2016,30/04/2016,30&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to split the start date and end date as&lt;/P&gt;&lt;P&gt;if you consider ID 1, i want the output date as&lt;/P&gt;&lt;P&gt;ID,start_date,end_date,Value&lt;/P&gt;&lt;P&gt;1,01/02/2016,29/02/2016,10&lt;/P&gt;&lt;P&gt;1,01/03/2016,31/03/2016,10&lt;/P&gt;&lt;P&gt;1,01/04/2016,30/04/2016,10&lt;/P&gt;&lt;P&gt;1,01/05/2016,31/12/9999,10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data is available till May Month(01/05/2016), So the end date for may month should come as 31/12/9999 to indicate it is the current data. Similarly it should split dates for all the ID's.&lt;/P&gt;&lt;P&gt;How can we achieve this split dates?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 11:18:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Split-dates-from-and-to/m-p/1141669#M373958</guid>
      <dc:creator>udaya_kumar</dc:creator>
      <dc:date>2016-06-17T11:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Split dates from and to</title>
      <link>https://community.qlik.com/t5/QlikView/Split-dates-from-and-to/m-p/1141670#M373959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Date(AddMonths(start_date, IterNo() - 1)) as start_date,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Date(If(MonthEnd(AddMonths(start_date, IterNo() - 1)) &amp;gt; MakeDate(2016,5,1), end_date, MonthEnd(AddMonths(start_date, IterNo() - 1)))) as End_date,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; ID,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Value&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;While AddMonths(start_date, IterNo() - 1) &amp;lt;= MakeDate(2016,5,1);&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,start_date,end_date,Value&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1,01/02/2016,31/12/9999,10&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2,01/03/2016,31/12/9999,25&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3,01/01/2016,31/01/2016,5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4,01/02/2016,30/04/2016,30&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/128295_Capture.PNG" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 11:26:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Split-dates-from-and-to/m-p/1141670#M373959</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-06-17T11:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: Split dates from and to</title>
      <link>https://community.qlik.com/t5/QlikView/Split-dates-from-and-to/m-p/1141671#M373960</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;Thank you for the reply.&lt;/P&gt;&lt;P&gt;The data given is just a sample from the data model.&lt;/P&gt;&lt;P&gt;The latest month data available is for may 2016, so i think we cannot use &lt;STRONG&gt;MakeDate(2016,5,1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;There is a row, previous to the last row in the above table snapshot, start date 01/05/2016 but the end date showing as 30/04/2016, i feel it is not right. Can you please check that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 11:33:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Split-dates-from-and-to/m-p/1141671#M373960</guid>
      <dc:creator>udaya_kumar</dc:creator>
      <dc:date>2016-06-17T11:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: Split dates from and to</title>
      <link>https://community.qlik.com/t5/QlikView/Split-dates-from-and-to/m-p/1141672#M373961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How else can be determine the May Date? Max from database?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be this to address the second issue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Date(AddMonths(start_date, IterNo() - 1)) as start_date,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Date(If(MonthEnd(AddMonths(start_date, IterNo() - 1)) &amp;gt; MakeDate(2016,5,1) and&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; MonthEnd(AddMonths(start_date, IterNo() - 1)) &amp;lt; end_date, end_date, MonthEnd(AddMonths(start_date, IterNo() - 1)))) as End_date,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; ID,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Value&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;While AddMonths(start_date, IterNo() - 1) &amp;lt;= MakeDate(2016,5,1);&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,start_date,end_date,Value&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1,01/02/2016,31/12/9999,10&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2,01/03/2016,31/12/9999,25&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3,01/01/2016,31/01/2016,5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4,01/02/2016,30/04/2016,30&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;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/128296_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 11:47:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Split-dates-from-and-to/m-p/1141672#M373961</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-06-17T11:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: Split dates from and to</title>
      <link>https://community.qlik.com/t5/QlikView/Split-dates-from-and-to/m-p/1141673#M373962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, we can get max(start_date) then we can get it as May 2016.&lt;/P&gt;&lt;P&gt;I don't want the end date of may to show as 31/05/2016, it should be 31/12/9999, because that is the live date and before may month, we consider it as history data, 31/12/9999 identifies it as live data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 11:56:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Split-dates-from-and-to/m-p/1141673#M373962</guid>
      <dc:creator>udaya_kumar</dc:creator>
      <dc:date>2016-06-17T11:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: Split dates from and to</title>
      <link>https://community.qlik.com/t5/QlikView/Split-dates-from-and-to/m-p/1141674#M373963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This?&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/128310_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Date(AddMonths(start_date, IterNo() - 1)) as start_date,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Date(If(MonthEnd(AddMonths(start_date, IterNo() - 1)) &amp;gt; MakeDate(2016,5,1), '31/12/9999', MonthEnd(AddMonths(start_date, IterNo() - 1)))) as End_date,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; ID,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Value&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;While AddMonths(start_date, IterNo() - 1) &amp;lt;= MakeDate(2016,5,1);&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,start_date,end_date,Value&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1,01/02/2016,31/12/9999,10&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2,01/03/2016,31/12/9999,25&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3,01/01/2016,31/01/2016,5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4,01/02/2016,30/04/2016,30&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 12:19:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Split-dates-from-and-to/m-p/1141674#M373963</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-06-17T12:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: Split dates from and to</title>
      <link>https://community.qlik.com/t5/QlikView/Split-dates-from-and-to/m-p/1141675#M373964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;t4:&lt;/P&gt;&lt;P&gt;Load ID,Date(Date#(start_date,'DD/MM/YYYY')) as start_date,Date(Date#(end_date,'DD/MM/YYYY')) as end_date,Value;&lt;/P&gt;&lt;P&gt;LOAD * Inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;ID,start_date,end_date,Value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1,01/02/2016,31/12/9999,10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2,01/03/2016,31/12/9999,25&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3,01/01/2016,31/01/2016,5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4,01/02/2016,30/04/2016,30&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MaxEndDate:&lt;/P&gt;&lt;P&gt;Load Max(end_date) as MaxEndDate&lt;/P&gt;&lt;P&gt;Resident t4&lt;/P&gt;&lt;P&gt;where year(end_date)&amp;lt;&amp;gt;9999;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vMaxEdnDate=Peek('MaxEndDate',0,'MaxEndDate');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate &lt;/P&gt;&lt;P&gt;t5:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load ID,Date(AddMonths(start_date, IterNo() - 1)) as start_date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(If(MonthEnd(AddMonths(start_date, IterNo() - 1)) &amp;gt; Date(AddMonths($(vMaxEdnDate),1)) , end_date,MonthEnd(AddMonths(start_date, IterNo() - 1)))) as end_date ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;resident t4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while&amp;nbsp;&amp;nbsp; AddMonths(start_date, IterNo() - 1) &amp;lt;= Date(AddMonths($(vMaxEdnDate),1)) ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table t4; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 12:39:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Split-dates-from-and-to/m-p/1141675#M373964</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2016-06-17T12:39:56Z</dc:date>
    </item>
  </channel>
</rss>

