<?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 Find the first date in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Find-the-first-date/m-p/2508591#M104545</link>
    <description>&lt;P&gt;Hello everyone,&lt;BR /&gt;In qliksense, In the script editor, I need to select for each order the first date that is followed by at least two other consecutive dates.&lt;BR /&gt;I have table like this:&lt;BR /&gt;&lt;BR /&gt;order, date&lt;BR /&gt;a,1-gen-2000&lt;BR /&gt;a,1-feb-2000&lt;BR /&gt;a,1-mar-2000&lt;BR /&gt;a,1-apr-2000&lt;BR /&gt;b,1-oct-2001&lt;BR /&gt;b,1-dec-2001&lt;BR /&gt;b,1-gen-2002&lt;BR /&gt;b,1-feb-2002&lt;BR /&gt;b,1-mar-2002&lt;BR /&gt;c,1-jun-2003&lt;BR /&gt;c,1-jul-2003&lt;BR /&gt;c,1-sep-2003&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the result i hexpect is:&lt;BR /&gt;order,date&lt;BR /&gt;a,1-gen-2000&lt;BR /&gt;b,1-dec-2001&lt;BR /&gt;c,null&lt;BR /&gt;&lt;BR /&gt;Any suggestion?&lt;BR /&gt;Thank you!!!&lt;/P&gt;</description>
    <pubDate>Thu, 06 Mar 2025 12:44:52 GMT</pubDate>
    <dc:creator>FEDE</dc:creator>
    <dc:date>2025-03-06T12:44:52Z</dc:date>
    <item>
      <title>Find the first date</title>
      <link>https://community.qlik.com/t5/App-Development/Find-the-first-date/m-p/2508591#M104545</link>
      <description>&lt;P&gt;Hello everyone,&lt;BR /&gt;In qliksense, In the script editor, I need to select for each order the first date that is followed by at least two other consecutive dates.&lt;BR /&gt;I have table like this:&lt;BR /&gt;&lt;BR /&gt;order, date&lt;BR /&gt;a,1-gen-2000&lt;BR /&gt;a,1-feb-2000&lt;BR /&gt;a,1-mar-2000&lt;BR /&gt;a,1-apr-2000&lt;BR /&gt;b,1-oct-2001&lt;BR /&gt;b,1-dec-2001&lt;BR /&gt;b,1-gen-2002&lt;BR /&gt;b,1-feb-2002&lt;BR /&gt;b,1-mar-2002&lt;BR /&gt;c,1-jun-2003&lt;BR /&gt;c,1-jul-2003&lt;BR /&gt;c,1-sep-2003&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the result i hexpect is:&lt;BR /&gt;order,date&lt;BR /&gt;a,1-gen-2000&lt;BR /&gt;b,1-dec-2001&lt;BR /&gt;c,null&lt;BR /&gt;&lt;BR /&gt;Any suggestion?&lt;BR /&gt;Thank you!!!&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2025 12:44:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Find-the-first-date/m-p/2508591#M104545</guid>
      <dc:creator>FEDE</dc:creator>
      <dc:date>2025-03-06T12:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Find the first date</title>
      <link>https://community.qlik.com/t5/App-Development/Find-the-first-date/m-p/2508599#M104546</link>
      <description>&lt;P&gt;I think I would add a flag to the first table using &lt;A href="https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/Scripting/InterRecordFunctions/Previous.htm" target="_self"&gt;Previous()&lt;/A&gt;, and create the result table based on that. Add a column (using join and resident load from the same table) where you check if previous(date) is the previous month - if it is set the flag to 1, otherwise to 0. After this you create a temporary table where you sum the flag field per the order field - all "order" with a value of at least 3 are those that you are looking for. Use those orders to check for min(date) and there's your answer.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something like that, unforutnately I don't have time right now to write code sample.&lt;/P&gt;
&lt;P&gt;left join(table1) load order, date, if(previous(monthstart(date))=monthstart(date) resident table1 order by order, date desc;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2025 13:27:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Find-the-first-date/m-p/2508599#M104546</guid>
      <dc:creator>henrikalmen</dc:creator>
      <dc:date>2025-03-06T13:27:20Z</dc:date>
    </item>
  </channel>
</rss>

