<?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: End Date out of Start Date employees table in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/End-Date-out-of-Start-Date-employees-table/m-p/1782025#M60862</link>
    <description>&lt;P&gt;Detailed and excellent response. thank you!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Feb 2021 15:08:10 GMT</pubDate>
    <dc:creator>chloe</dc:creator>
    <dc:date>2021-02-11T15:08:10Z</dc:date>
    <item>
      <title>End Date out of Start Date employees table</title>
      <link>https://community.qlik.com/t5/App-Development/End-Date-out-of-Start-Date-employees-table/m-p/1781996#M60855</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;I want to create a new column as end date out of the start date column as below:&lt;/P&gt;&lt;P&gt;SalesmanID&amp;nbsp; |&amp;nbsp; Department&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp;StartDate&amp;nbsp; |&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;EndDate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;4750&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp;Management&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; 4/30/2020 |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;4750&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; Ladies' Footwea&amp;nbsp; | 01/07/2019 |&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;STRONG&gt;04/29/2020&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I do it?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 14:05:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/End-Date-out-of-Start-Date-employees-table/m-p/1781996#M60855</guid>
      <dc:creator>chloe</dc:creator>
      <dc:date>2021-02-11T14:05:30Z</dc:date>
    </item>
    <item>
      <title>End Date out of Start Date employees table</title>
      <link>https://community.qlik.com/t5/App-Development/End-Date-out-of-Start-Date-employees-table/m-p/1782009#M60858</link>
      <description>&lt;P&gt;The key to your answer will be using the &lt;A href="https://help.qlik.com/en-US/sense/November2020/Subsystems/Hub/Content/Sense_Hub/Scripting/InterRecordFunctions/Previous.htm" target="_blank" rel="noopener"&gt;Previous&lt;/A&gt; keyword along with ordering your table.&amp;nbsp; I have a sample script below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DATA:
LOAD *,
Date(Date#(StartDateString, 'MM/DD/YYYY')) AS StartDate
;
LOAD * Inline
[
	SalesmanID, Department, StartDateString
    4750, Management, 4/30/2020, 
    4750, Diesel Engine Spark Plugs, 02/05/2018,
    4750, Ladies' Footwear, 01/07/2019,
    4750, Pet Rocks, 08/09/2018, 
    123, Management, 5/30/2020, 
    123, Hypervisor Sales, 12/05/2018,
    123, Microphone Sales, 01/23/2019,
    123, HR, 08/09/2017, 
]
;

DROP FIELD StartDateString
;

DATA2:
NoConcatenate
LOAD * RESIDENT DATA
ORDER BY SalesmanID, StartDate DESC
;

DROP TABLE DATA
;

DATA3:
LOAD 
*,
If(Previous(SalesmanID) = SalesmanID, Date(Previous(StartDate) - 1, Null())) AS 'EndDate'
RESIDENT DATA2
;

DROP TABLE DATA2
;

EXIT Script
;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 14:26:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/End-Date-out-of-Start-Date-employees-table/m-p/1782009#M60858</guid>
      <dc:creator>JustinDallas</dc:creator>
      <dc:date>2021-02-11T14:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: End Date out of Start Date employees table</title>
      <link>https://community.qlik.com/t5/App-Development/End-Date-out-of-Start-Date-employees-table/m-p/1782025#M60862</link>
      <description>&lt;P&gt;Detailed and excellent response. thank you!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 15:08:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/End-Date-out-of-Start-Date-employees-table/m-p/1782025#M60862</guid>
      <dc:creator>chloe</dc:creator>
      <dc:date>2021-02-11T15:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: End Date out of Start Date employees table</title>
      <link>https://community.qlik.com/t5/App-Development/End-Date-out-of-Start-Date-employees-table/m-p/1782033#M60863</link>
      <description>&lt;P&gt;Feel free to mark it correct if it works out for you.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 15:30:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/End-Date-out-of-Start-Date-employees-table/m-p/1782033#M60863</guid>
      <dc:creator>JustinDallas</dc:creator>
      <dc:date>2021-02-11T15:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: End Date out of Start Date employees table</title>
      <link>https://community.qlik.com/t5/App-Development/End-Date-out-of-Start-Date-employees-table/m-p/1989405#M81772</link>
      <description>&lt;P&gt;using previous make the first row null, what if we don't want it null&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 07:36:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/End-Date-out-of-Start-Date-employees-table/m-p/1989405#M81772</guid>
      <dc:creator>Jamshaid_Afzal</dc:creator>
      <dc:date>2022-10-06T07:36:40Z</dc:date>
    </item>
    <item>
      <title>Re: End Date out of Start Date employees table</title>
      <link>https://community.qlik.com/t5/App-Development/End-Date-out-of-Start-Date-employees-table/m-p/1990403#M81899</link>
      <description>&lt;P&gt;Then you should put something else in the if-statement.&amp;nbsp; Right now, it's got Null(), you could put anything that you wanted there.&lt;/P&gt;</description>
      <pubDate>Sat, 08 Oct 2022 01:51:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/End-Date-out-of-Start-Date-employees-table/m-p/1990403#M81899</guid>
      <dc:creator>JustinDallas</dc:creator>
      <dc:date>2022-10-08T01:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: End Date out of Start Date employees table</title>
      <link>https://community.qlik.com/t5/App-Development/End-Date-out-of-Start-Date-employees-table/m-p/1990702#M81942</link>
      <description>&lt;P&gt;thanks for your response, but I want&amp;nbsp;&lt;STRONG&gt;04/29/2020 &lt;/STRONG&gt;in front of the Management department&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2022 10:18:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/End-Date-out-of-Start-Date-employees-table/m-p/1990702#M81942</guid>
      <dc:creator>Jamshaid_Afzal</dc:creator>
      <dc:date>2022-10-10T10:18:07Z</dc:date>
    </item>
  </channel>
</rss>

