<?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 Sort List by Date from and Date to in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Sort-List-by-Date-from-and-Date-to/m-p/2517988#M106007</link>
    <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;I have a table like this:&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;product&lt;/TD&gt;&lt;TD&gt;date_from&lt;/TD&gt;&lt;TD&gt;date_to&lt;/TD&gt;&lt;TD&gt;price&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;18.02.2025&lt;/TD&gt;&lt;TD&gt;31.12.9999&lt;/TD&gt;&lt;TD&gt;89,99&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;08.03.2024&lt;/TD&gt;&lt;TD&gt;31.12.9999&lt;/TD&gt;&lt;TD&gt;79,99&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;29.01.2024&lt;/TD&gt;&lt;TD&gt;17.02.2024&lt;/TD&gt;&lt;TD&gt;69,99&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;12.01.2024&lt;/TD&gt;&lt;TD&gt;31.12.9999&lt;/TD&gt;&lt;TD&gt;75,99&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;21.11.2023&lt;/TD&gt;&lt;TD&gt;31.12.9999&lt;/TD&gt;&lt;TD&gt;84,99&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and i want to sort the table like this:&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;product&lt;/TD&gt;&lt;TD&gt;date_from&lt;/TD&gt;&lt;TD&gt;date_to&lt;/TD&gt;&lt;TD&gt;price&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;18.02.2025&lt;/TD&gt;&lt;TD&gt;31.12.9999&lt;/TD&gt;&lt;TD&gt;89,99&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;08.03.2024&lt;/TD&gt;&lt;TD&gt;17.02.2025&lt;/TD&gt;&lt;TD&gt;79,99&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;18.02.2024&lt;/TD&gt;&lt;TD&gt;07.03.2024&lt;/TD&gt;&lt;TD&gt;75,99&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;29.01.2024&lt;/TD&gt;&lt;TD&gt;17.02.2024&lt;/TD&gt;&lt;TD&gt;69,99&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;12.01.2024&lt;/TD&gt;&lt;TD&gt;28.01.2024&lt;/TD&gt;&lt;TD&gt;75,99&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;21.11.2023&lt;/TD&gt;&lt;TD&gt;11.01.2024&lt;/TD&gt;&lt;TD&gt;84,99&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anybody help me?&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
    <pubDate>Thu, 15 May 2025 19:15:31 GMT</pubDate>
    <dc:creator>wunderch</dc:creator>
    <dc:date>2025-05-15T19:15:31Z</dc:date>
    <item>
      <title>Sort List by Date from and Date to</title>
      <link>https://community.qlik.com/t5/App-Development/Sort-List-by-Date-from-and-Date-to/m-p/2517988#M106007</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;I have a table like this:&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;product&lt;/TD&gt;&lt;TD&gt;date_from&lt;/TD&gt;&lt;TD&gt;date_to&lt;/TD&gt;&lt;TD&gt;price&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;18.02.2025&lt;/TD&gt;&lt;TD&gt;31.12.9999&lt;/TD&gt;&lt;TD&gt;89,99&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;08.03.2024&lt;/TD&gt;&lt;TD&gt;31.12.9999&lt;/TD&gt;&lt;TD&gt;79,99&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;29.01.2024&lt;/TD&gt;&lt;TD&gt;17.02.2024&lt;/TD&gt;&lt;TD&gt;69,99&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;12.01.2024&lt;/TD&gt;&lt;TD&gt;31.12.9999&lt;/TD&gt;&lt;TD&gt;75,99&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;21.11.2023&lt;/TD&gt;&lt;TD&gt;31.12.9999&lt;/TD&gt;&lt;TD&gt;84,99&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and i want to sort the table like this:&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;product&lt;/TD&gt;&lt;TD&gt;date_from&lt;/TD&gt;&lt;TD&gt;date_to&lt;/TD&gt;&lt;TD&gt;price&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;18.02.2025&lt;/TD&gt;&lt;TD&gt;31.12.9999&lt;/TD&gt;&lt;TD&gt;89,99&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;08.03.2024&lt;/TD&gt;&lt;TD&gt;17.02.2025&lt;/TD&gt;&lt;TD&gt;79,99&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;18.02.2024&lt;/TD&gt;&lt;TD&gt;07.03.2024&lt;/TD&gt;&lt;TD&gt;75,99&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;29.01.2024&lt;/TD&gt;&lt;TD&gt;17.02.2024&lt;/TD&gt;&lt;TD&gt;69,99&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;12.01.2024&lt;/TD&gt;&lt;TD&gt;28.01.2024&lt;/TD&gt;&lt;TD&gt;75,99&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;21.11.2023&lt;/TD&gt;&lt;TD&gt;11.01.2024&lt;/TD&gt;&lt;TD&gt;84,99&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anybody help me?&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Thu, 15 May 2025 19:15:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sort-List-by-Date-from-and-Date-to/m-p/2517988#M106007</guid>
      <dc:creator>wunderch</dc:creator>
      <dc:date>2025-05-15T19:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: Sort List by Date from and Date to</title>
      <link>https://community.qlik.com/t5/App-Development/Sort-List-by-Date-from-and-Date-to/m-p/2518003#M106009</link>
      <description>&lt;P&gt;what is the logic for 3rd line&lt;/P&gt;&lt;P&gt;A 18.02.2024 07.03.2024 75,99&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prashant Sangle&lt;/P&gt;</description>
      <pubDate>Fri, 16 May 2025 04:59:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sort-List-by-Date-from-and-Date-to/m-p/2518003#M106009</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2025-05-16T04:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: Sort List by Date from and Date to</title>
      <link>https://community.qlik.com/t5/App-Development/Sort-List-by-Date-from-and-Date-to/m-p/2518004#M106010</link>
      <description>&lt;P&gt;Can you try to put words to the logic you want? That is often helpful when trying to find a solution.&lt;/P&gt;&lt;P&gt;My first impression of your query is that you will need to do some kind of comparison and select between the date_to value and the date_from value on the row above.&lt;/P&gt;&lt;P&gt;Helpful function to consider are peek(),&amp;nbsp; rangemin()/rangemax() and maybe coalesce()/alt().&lt;/P&gt;</description>
      <pubDate>Fri, 16 May 2025 05:00:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sort-List-by-Date-from-and-Date-to/m-p/2518004#M106010</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2025-05-16T05:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: Sort List by Date from and Date to</title>
      <link>https://community.qlik.com/t5/App-Development/Sort-List-by-Date-from-and-Date-to/m-p/2518005#M106011</link>
      <description>&lt;P&gt;Sorry for my quick question. Here is my logic:&lt;/P&gt;&lt;P&gt;Yes, I would like to put the sentences into a time series by comparing the date from and the date to.&lt;/P&gt;&lt;P&gt;To get the "date_to" from the next "date_from-1" is not the challenge. I get this with peek().&lt;/P&gt;&lt;P&gt;My problem is how can i get the additional row "18.02.2024" - "07.03.2024" because the row&amp;nbsp; from "29.01.2024" is only valid to 17.02.2024 and the next row is only valid from 08.03.2024.&lt;BR /&gt;So i have to create a row with the last row 12.01.2024.&lt;/P&gt;&lt;P&gt;I hope you unterstand my challenge?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 May 2025 09:46:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sort-List-by-Date-from-and-Date-to/m-p/2518005#M106011</guid>
      <dc:creator>wunderch</dc:creator>
      <dc:date>2025-05-16T09:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: Sort List by Date from and Date to</title>
      <link>https://community.qlik.com/t5/App-Development/Sort-List-by-Date-from-and-Date-to/m-p/2518115#M106040</link>
      <description>&lt;P&gt;Sorry for my quick question. Here is my logic:&lt;/P&gt;&lt;P&gt;Yes, I would like to put the sentences into a time series by comparing the date from and the date to.&lt;/P&gt;&lt;P&gt;To get the "date_to" from the next "date_from-1" is not the challenge. I get this with peek().&lt;/P&gt;&lt;P&gt;My problem is how can i get the additional row "18.02.2024" - "07.03.2024" because the row&amp;nbsp; from "29.01.2024" is only valid to 17.02.2024 and the next row is only valid from 08.03.2024.&lt;BR /&gt;So i have to create a row with the last row 12.01.2024.&lt;/P&gt;&lt;P&gt;I hope you unterstand my challenge?&lt;/P&gt;</description>
      <pubDate>Sat, 17 May 2025 14:28:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sort-List-by-Date-from-and-Date-to/m-p/2518115#M106040</guid>
      <dc:creator>wunderch</dc:creator>
      <dc:date>2025-05-17T14:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Sort List by Date from and Date to</title>
      <link>https://community.qlik.com/t5/App-Development/Sort-List-by-Date-from-and-Date-to/m-p/2518158#M106054</link>
      <description>&lt;P&gt;&amp;amp; what is logic for price?&lt;/P&gt;</description>
      <pubDate>Mon, 19 May 2025 06:43:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sort-List-by-Date-from-and-Date-to/m-p/2518158#M106054</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2025-05-19T06:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: Sort List by Date from and Date to</title>
      <link>https://community.qlik.com/t5/App-Development/Sort-List-by-Date-from-and-Date-to/m-p/2518167#M106056</link>
      <description>&lt;P&gt;It's actually the same logic.&lt;/P&gt;&lt;P&gt;Take the last valid price.&lt;/P&gt;&lt;P&gt;In this case, it's the rate from January 12, 2024, because it's valid until infinity, and the next price is only valid from March 8, 2024.&lt;/P&gt;</description>
      <pubDate>Mon, 19 May 2025 07:54:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sort-List-by-Date-from-and-Date-to/m-p/2518167#M106056</guid>
      <dc:creator>wunderch</dc:creator>
      <dc:date>2025-05-19T07:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Sort List by Date from and Date to</title>
      <link>https://community.qlik.com/t5/App-Development/Sort-List-by-Date-from-and-Date-to/m-p/2518470#M106097</link>
      <description>&lt;P&gt;You need to apply the interrecord-stuff with peek() and previous() twice. The first one checked if a real and valid to-date exists and if this fits to it's previous from-date - if not you set a flag-value of 2 and otherwise it's 1.&lt;/P&gt;&lt;P&gt;The next step is performing a while-loop, like:&lt;/P&gt;&lt;P&gt;load * resident while iterno() &amp;lt;= MyFlag;&lt;/P&gt;&lt;P&gt;which adds an extra record for those records which have a date-gap and then the final from-to data are evaluated per interrecord-functions.&lt;/P&gt;</description>
      <pubDate>Wed, 21 May 2025 11:54:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sort-List-by-Date-from-and-Date-to/m-p/2518470#M106097</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2025-05-21T11:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: Sort List by Date from and Date to</title>
      <link>https://community.qlik.com/t5/App-Development/Sort-List-by-Date-from-and-Date-to/m-p/2518497#M106103</link>
      <description>&lt;P&gt;Thank you for the answer.&lt;/P&gt;&lt;P&gt;I understand the logic, but unfortunately I can't convert it into the correct code.&lt;/P&gt;&lt;P&gt;Can you please give me an example of what the code should look like?&lt;/P&gt;</description>
      <pubDate>Wed, 21 May 2025 14:16:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sort-List-by-Date-from-and-Date-to/m-p/2518497#M106103</guid>
      <dc:creator>wunderch</dc:creator>
      <dc:date>2025-05-21T14:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: Sort List by Date from and Date to</title>
      <link>https://community.qlik.com/t5/App-Development/Sort-List-by-Date-from-and-Date-to/m-p/2518506#M106104</link>
      <description>&lt;P&gt;It may go in this direction whereby you may need some more if-loops especially for the extra records and/or further adjustments, for example the date-offset between the normal and extra records.&lt;/P&gt;&lt;P&gt;load *, if(product = previous(product), previous(from) - 1, ...) as to2;&lt;BR /&gt;load * while iterno() &amp;lt;= flag;&lt;BR /&gt;load *, if(product = previous(product) and to &amp;lt; '31.12.9999' and previous(from) - to &amp;gt; 1, 2, 1) as flag&lt;BR /&gt;resident X order by product, from desc;&lt;/P&gt;</description>
      <pubDate>Wed, 21 May 2025 15:17:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sort-List-by-Date-from-and-Date-to/m-p/2518506#M106104</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2025-05-21T15:17:51Z</dc:date>
    </item>
  </channel>
</rss>

