<?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: Backorders - remove duplicates entries and keep the most recent one in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Backorders-remove-duplicates-entries-and-keep-the-most-recent/m-p/1945663#M77937</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thanks for your quick reply!&lt;/P&gt;
&lt;P&gt;I already thought about adding this indicator. However, in the example above, the old record would be counted as an old record. However, this is not an old record, as the back order is still open (today there is still a back order). I just need in these cases not to upload the old records.&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 20 Jun 2022 11:35:23 GMT</pubDate>
    <dc:creator>charlie2</dc:creator>
    <dc:date>2022-06-20T11:35:23Z</dc:date>
    <item>
      <title>Backorders - remove duplicates entries and keep the most recent one</title>
      <link>https://community.qlik.com/t5/App-Development/Backorders-remove-duplicates-entries-and-keep-the-most-recent/m-p/1943131#M77715</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;I have a Table in a .csv which contains information on back orders. More specifically, it contains the Order number, the Position of the order, the quantities which are in back order, and the date the file was updated. This file is every day update and new records are entered below the other ones. As an example, the table is structured as followed:&lt;/P&gt;
&lt;P&gt;backorders:&lt;/P&gt;
&lt;P&gt;load&amp;nbsp;&lt;/P&gt;
&lt;P&gt;order_num &amp;amp; '_' &amp;amp; position AS primary_key,&lt;/P&gt;
&lt;P&gt;order_num,&lt;/P&gt;
&lt;P&gt;position,&lt;/P&gt;
&lt;P&gt;qty_open,&lt;/P&gt;
&lt;P&gt;update_date&lt;/P&gt;
&lt;P&gt;FROM ....&lt;/P&gt;
&lt;P&gt;My goal is to know the back orders today but also keep the historical development of these. My idea was to first filter the backorders from today with a WHERE clause and then load the past backorders and load a binary code in each table to indicate if these correspond to the past or to today.&amp;nbsp; However, a backorder with a past date that has not been resolved yet will also be entered as a record today. For example, two records might look like that:&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="25%" height="25px"&gt;order_num&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;position&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;qty_open&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;update_date&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="25px"&gt;123456&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;10&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;50&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;13.06.2022&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="25px"&gt;123456&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;10&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;50&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;14.06.2022&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This indicates that the backorder was not yet resolved and today (14.06.2022) it is still open. How can I make sure that in these cases I only load the most recent one and not duplicate them?&lt;/P&gt;
&lt;P&gt;Any help is more than appreciated&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 06:19:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Backorders-remove-duplicates-entries-and-keep-the-most-recent/m-p/1943131#M77715</guid>
      <dc:creator>charlie2</dc:creator>
      <dc:date>2022-06-14T06:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: Backorders - remove duplicates entries and keep the most recent one</title>
      <link>https://community.qlik.com/t5/App-Development/Backorders-remove-duplicates-entries-and-keep-the-most-recent/m-p/1943161#M77718</link>
      <description>&lt;P&gt;Hi, you can load order info just for max update date:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;NoConcatenate
main:
LOAD 
primary_key,
order_num,
position,
qty_open,
max(update_date) as max_update_date,
if (today()=max(update_date), 'today', 'older') as indicator
RESIDENT backorders
GROUP BY primary_key, order_num, position, qty_open;

drop table backorders; &lt;/LI-CODE&gt;
&lt;P&gt;additionally you can add indicator to check/filter today and older orders.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 07:33:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Backorders-remove-duplicates-entries-and-keep-the-most-recent/m-p/1943161#M77718</guid>
      <dc:creator>justISO</dc:creator>
      <dc:date>2022-06-14T07:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: Backorders - remove duplicates entries and keep the most recent one</title>
      <link>https://community.qlik.com/t5/App-Development/Backorders-remove-duplicates-entries-and-keep-the-most-recent/m-p/1945663#M77937</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thanks for your quick reply!&lt;/P&gt;
&lt;P&gt;I already thought about adding this indicator. However, in the example above, the old record would be counted as an old record. However, this is not an old record, as the back order is still open (today there is still a back order). I just need in these cases not to upload the old records.&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 11:35:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Backorders-remove-duplicates-entries-and-keep-the-most-recent/m-p/1945663#M77937</guid>
      <dc:creator>charlie2</dc:creator>
      <dc:date>2022-06-20T11:35:23Z</dc:date>
    </item>
  </channel>
</rss>

