<?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 Join and Group in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Join-and-Group/m-p/179606#M46398</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a application that contains undelivered customer orders grouped by article no and warehouse.&lt;/P&gt;&lt;P&gt;I would like to join in the purchase order with the nearest delivery date and its confirmation type (D-Def, P- Prel, X- Not confirmed).&lt;/P&gt;&lt;P&gt;I have managed to get the lowest date but cant get the confirmation type.&lt;/P&gt;&lt;P&gt;Problem is that INKÖPSSTOCK2.QVD can contain to Purchas orders with the same OJBKLT. Then I want only the one with lowest OJDAT1 (created date).&lt;/P&gt;&lt;P&gt;OJBKLT has format YYYYWWD that converts to date YYYYMMDD in the end.&lt;/P&gt;&lt;P&gt;The result should be like:&lt;/P&gt;&lt;P&gt;Artno_warehouseno, Low_conf_date, Confimationtype&lt;/P&gt;&lt;P&gt;Ex: 100-01, 2009-12-08, D&lt;/P&gt;&lt;P&gt;Beräknadinleverans_tmp:&lt;BR /&gt;LOAD&lt;BR /&gt; Artnr&amp;amp;'-'&amp;amp;OJLST as Artno_warehouseno,&lt;BR /&gt; Artnr as Articleno,&lt;BR /&gt; OJLST as warehouseno,&lt;BR /&gt; min(OJBKLT) as Low_conf_date&lt;BR /&gt;FROM &lt;D&gt; (qvd)&lt;BR /&gt;group by Artnr, OJLST;&lt;/D&gt;&lt;/P&gt;&lt;P&gt;Left join (Beräknadinleverans_tmp)&lt;BR /&gt;LOAD&lt;BR /&gt; Artnr&amp;amp;'-'&amp;amp;OJLST as Artno_warehouseno,&lt;BR /&gt; OJBKLT as Low_conf_date,&lt;BR /&gt; Confirmationtype&lt;BR /&gt;FROM &lt;D&gt; (qvd);&lt;/D&gt;&lt;/P&gt;&lt;P&gt;Beräknadinleverans_tmp2:&lt;BR /&gt;LOAD&lt;BR /&gt; Artno_warehouseno,&lt;BR /&gt; OJAID,&lt;BR /&gt; OJLST,&lt;BR /&gt; Low_conf_date,&lt;BR /&gt; left(Low_conf_date,4) as Year,&lt;BR /&gt; mid(Low_conf_date,5,2) as Vecka,&lt;BR /&gt; Right(Low_conf_date,1) as Dag,&lt;BR /&gt; Confirmationtype&lt;BR /&gt;Resident Beräknadinleverans_tmp;&lt;/P&gt;&lt;P&gt;Drop table Beräknadinleverans_tmp;&lt;/P&gt;&lt;P&gt;Beräknadinleverans:&lt;BR /&gt;LEFT JOIN (Restorders)&lt;BR /&gt;LOAD&lt;BR /&gt; Artno_warehouseno,&lt;BR /&gt; OJAID,&lt;BR /&gt; OJLST,&lt;BR /&gt; MakeWeekDate(År, Vecka, Dag) as Low_conf_date,&lt;BR /&gt; Confirmationtype&lt;BR /&gt;Resident Beräknadinleverans_tmp2;&lt;/P&gt;&lt;P&gt;drop table Beräknadinleverans_tmp2;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Dec 2009 22:12:17 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-12-08T22:12:17Z</dc:date>
    <item>
      <title>Join and Group</title>
      <link>https://community.qlik.com/t5/QlikView/Join-and-Group/m-p/179606#M46398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a application that contains undelivered customer orders grouped by article no and warehouse.&lt;/P&gt;&lt;P&gt;I would like to join in the purchase order with the nearest delivery date and its confirmation type (D-Def, P- Prel, X- Not confirmed).&lt;/P&gt;&lt;P&gt;I have managed to get the lowest date but cant get the confirmation type.&lt;/P&gt;&lt;P&gt;Problem is that INKÖPSSTOCK2.QVD can contain to Purchas orders with the same OJBKLT. Then I want only the one with lowest OJDAT1 (created date).&lt;/P&gt;&lt;P&gt;OJBKLT has format YYYYWWD that converts to date YYYYMMDD in the end.&lt;/P&gt;&lt;P&gt;The result should be like:&lt;/P&gt;&lt;P&gt;Artno_warehouseno, Low_conf_date, Confimationtype&lt;/P&gt;&lt;P&gt;Ex: 100-01, 2009-12-08, D&lt;/P&gt;&lt;P&gt;Beräknadinleverans_tmp:&lt;BR /&gt;LOAD&lt;BR /&gt; Artnr&amp;amp;'-'&amp;amp;OJLST as Artno_warehouseno,&lt;BR /&gt; Artnr as Articleno,&lt;BR /&gt; OJLST as warehouseno,&lt;BR /&gt; min(OJBKLT) as Low_conf_date&lt;BR /&gt;FROM &lt;D&gt; (qvd)&lt;BR /&gt;group by Artnr, OJLST;&lt;/D&gt;&lt;/P&gt;&lt;P&gt;Left join (Beräknadinleverans_tmp)&lt;BR /&gt;LOAD&lt;BR /&gt; Artnr&amp;amp;'-'&amp;amp;OJLST as Artno_warehouseno,&lt;BR /&gt; OJBKLT as Low_conf_date,&lt;BR /&gt; Confirmationtype&lt;BR /&gt;FROM &lt;D&gt; (qvd);&lt;/D&gt;&lt;/P&gt;&lt;P&gt;Beräknadinleverans_tmp2:&lt;BR /&gt;LOAD&lt;BR /&gt; Artno_warehouseno,&lt;BR /&gt; OJAID,&lt;BR /&gt; OJLST,&lt;BR /&gt; Low_conf_date,&lt;BR /&gt; left(Low_conf_date,4) as Year,&lt;BR /&gt; mid(Low_conf_date,5,2) as Vecka,&lt;BR /&gt; Right(Low_conf_date,1) as Dag,&lt;BR /&gt; Confirmationtype&lt;BR /&gt;Resident Beräknadinleverans_tmp;&lt;/P&gt;&lt;P&gt;Drop table Beräknadinleverans_tmp;&lt;/P&gt;&lt;P&gt;Beräknadinleverans:&lt;BR /&gt;LEFT JOIN (Restorders)&lt;BR /&gt;LOAD&lt;BR /&gt; Artno_warehouseno,&lt;BR /&gt; OJAID,&lt;BR /&gt; OJLST,&lt;BR /&gt; MakeWeekDate(År, Vecka, Dag) as Low_conf_date,&lt;BR /&gt; Confirmationtype&lt;BR /&gt;Resident Beräknadinleverans_tmp2;&lt;/P&gt;&lt;P&gt;drop table Beräknadinleverans_tmp2;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2009 22:12:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join-and-Group/m-p/179606#M46398</guid>
      <dc:creator />
      <dc:date>2009-12-08T22:12:17Z</dc:date>
    </item>
  </channel>
</rss>

