<?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 Creating a date range table from a single date column field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Creating-a-date-range-table-from-a-single-date-column-field/m-p/1803877#M1211938</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I am trying to create a table with a start and finish date for specified rows, I am at a loss on how to go about it&lt;/P&gt;&lt;P&gt;I have&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Test:
load * inline [
	ID, includeOrder, Name, thedate
	1, 1, ABC, 1/1/2020
	2, , ABC, 1/1/2019
	3, 2, BCD, 2/2/2020
	4, 3, CDE, 1/1/2020
	4, 3, CDE2, 1/1/2020
];


NoConcatenate
test1:
load ID,  min(thedate) as mindate
resident Test
group by ID;
left join (Test)
load *
resident test1;
	
drop table test1;&lt;/LI-CODE&gt;&lt;P&gt;from the input table not all ID's are to be in the final output.&amp;nbsp; thedate column should specify the start of the include order, then the peek(includeOrder) should be it's end date.&lt;/P&gt;&lt;P&gt;I need all the values in the table, so I cannot lose ID 2 in this example.&lt;/P&gt;&lt;P&gt;I also need to eliminate one of the IncludeOrder 3's that are present.&amp;nbsp; one per Include order.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any help is appreciated&lt;/P&gt;</description>
    <pubDate>Thu, 29 Apr 2021 15:30:40 GMT</pubDate>
    <dc:creator>RogerG</dc:creator>
    <dc:date>2021-04-29T15:30:40Z</dc:date>
    <item>
      <title>Creating a date range table from a single date column field</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-date-range-table-from-a-single-date-column-field/m-p/1803877#M1211938</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I am trying to create a table with a start and finish date for specified rows, I am at a loss on how to go about it&lt;/P&gt;&lt;P&gt;I have&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Test:
load * inline [
	ID, includeOrder, Name, thedate
	1, 1, ABC, 1/1/2020
	2, , ABC, 1/1/2019
	3, 2, BCD, 2/2/2020
	4, 3, CDE, 1/1/2020
	4, 3, CDE2, 1/1/2020
];


NoConcatenate
test1:
load ID,  min(thedate) as mindate
resident Test
group by ID;
left join (Test)
load *
resident test1;
	
drop table test1;&lt;/LI-CODE&gt;&lt;P&gt;from the input table not all ID's are to be in the final output.&amp;nbsp; thedate column should specify the start of the include order, then the peek(includeOrder) should be it's end date.&lt;/P&gt;&lt;P&gt;I need all the values in the table, so I cannot lose ID 2 in this example.&lt;/P&gt;&lt;P&gt;I also need to eliminate one of the IncludeOrder 3's that are present.&amp;nbsp; one per Include order.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any help is appreciated&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 15:30:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-date-range-table-from-a-single-date-column-field/m-p/1803877#M1211938</guid>
      <dc:creator>RogerG</dc:creator>
      <dc:date>2021-04-29T15:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a date range table from a single date column field</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-date-range-table-from-a-single-date-column-field/m-p/1804272#M1211964</link>
      <description>&lt;P&gt;Tried to simplify it by removing all the uneeded records into a temp table, then added this after the initial load, but the Peek function is not returning my value&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;right join (Test) //get all known milestones		
	load ID, 
		includeOrder,
		thedate as CTPhaseStart,
		peek('thedate') as CTPhaseEnd
	RESIDENT Test
	Order by ID, includeOrder desc;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However the Peek cannot find the next value.&lt;/P&gt;&lt;P&gt;Anyone able to help :)?&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 17:32:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-date-range-table-from-a-single-date-column-field/m-p/1804272#M1211964</guid>
      <dc:creator>RogerG</dc:creator>
      <dc:date>2021-04-30T17:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a date range table from a single date column field</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-date-range-table-from-a-single-date-column-field/m-p/1804442#M1211982</link>
      <description>&lt;P&gt;Can you simplfy what do you want to achieve by putting the input and the desired output in excel file so that we can understand what you want to achieve&lt;/P&gt;</description>
      <pubDate>Sun, 02 May 2021 22:36:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-date-range-table-from-a-single-date-column-field/m-p/1804442#M1211982</guid>
      <dc:creator>yassinemhadhbi</dc:creator>
      <dc:date>2021-05-02T22:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a date range table from a single date column field</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-date-range-table-from-a-single-date-column-field/m-p/1804681#M1212013</link>
      <description>&lt;P&gt;I figured out what I did wrong.&amp;nbsp; I didn't include thedate as one of the selection criteria, therefore peek had nothing to peek into&lt;/P&gt;&lt;P&gt;the correct answer is&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;right join (Test) //get all known milestones		
	load ID, 
		includeOrder,
                thedate, // need this to be able to peek at it
		thedate as CTPhaseStart,
		peek('thedate') as CTPhaseEnd
	RESIDENT Test
	Order by ID, includeOrder desc;&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 03 May 2021 15:50:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-date-range-table-from-a-single-date-column-field/m-p/1804681#M1212013</guid>
      <dc:creator>RogerG</dc:creator>
      <dc:date>2021-05-03T15:50:37Z</dc:date>
    </item>
  </channel>
</rss>

