<?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: load only min  data value row in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/load-only-min-data-value-row/m-p/2030093#M1222354</link>
    <description>&lt;P&gt;&lt;SPAN&gt;You can modify your query to include a subquery that selects the minimum date for each item, and then use that in the main query to filter the rows. Here's an example of how you can modify your query:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SQL select&lt;BR /&gt;max(POQ.ITMREF_0) as [Article],&lt;BR /&gt;max(POQ.QTYSTU_0) as [Qty 1°arr.],&lt;BR /&gt;min(POQ.EXTRCPDAT_0) as [1° Receiving Date ],&lt;BR /&gt;max(POQ.RCPQTYSTU_0) as [1° Qty Ric. For.]&lt;BR /&gt;//max(POQ.YDATARCVPR_0) as [1° Date Receiving Conf.]&lt;BR /&gt;from xxxx.yyyy.PORDERQ POQ&lt;BR /&gt;INNER JOIN (SELECT ITMREF_0, min(EXTRCPDAT_0) as min_date from xxxx.yyyy.PORDERQ where POQ.QTYSTU_0-POQ.RCPQTYSTU_0 &amp;gt;0 and POQ.RCPCLEFLG_0 = 1 and year(POQ.YDATARCVPR_0)&amp;lt;&amp;gt;2000 group by ITMREF_0) subquery&lt;BR /&gt;ON POQ.ITMREF_0 = subquery.ITMREF_0 AND POQ.EXTRCPDAT_0 = subquery.min_date&lt;BR /&gt;where POQ.QTYSTU_0-POQ.RCPQTYSTU_0 &amp;gt;0 and POQ.RCPCLEFLG_0 = 1 and year(POQ.YDATARCVPR_0)&amp;lt;&amp;gt;2000&lt;BR /&gt;group by POQ.ITMREF_0&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The subquery selects the minimum date for each item and join it with the main query, filtering only the rows with the min date of each item.&lt;/P&gt;
&lt;P&gt;Please note that the query might require some adjustments depending on the specific structure and contents of the xxxx.yyyy.PORDERQ table.&lt;/P&gt;</description>
    <pubDate>Wed, 25 Jan 2023 20:56:33 GMT</pubDate>
    <dc:creator>jcmachado</dc:creator>
    <dc:date>2023-01-25T20:56:33Z</dc:date>
    <item>
      <title>load only min  data value row</title>
      <link>https://community.qlik.com/t5/QlikView/load-only-min-data-value-row/m-p/2029468#M1222312</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have the following script:&lt;/P&gt;
&lt;P&gt;Tabella1°Qtà:&lt;BR /&gt;SQL select &lt;BR /&gt;max(POQ.ITMREF_0) as [Article],&lt;BR /&gt;max(POQ.QTYSTU_0) as [Qty 1°arr.],&lt;BR /&gt;min(POQ.EXTRCPDAT_0) as [1° Receiving Date ],&lt;BR /&gt;max(POQ.RCPQTYSTU_0) as [1° Qty Ric. For.]&lt;BR /&gt;//max(POQ.YDATARCVPR_0) as [1° Date Receiving Conf.]&lt;BR /&gt;from xxxx.yyyy.PORDERQ POQ&lt;BR /&gt;where POQ.QTYSTU_0-POQ.RCPQTYSTU_0 &amp;gt;0 and POQ.RCPCLEFLG_0 = 1 and year(POQ.YDATARCVPR_0)&amp;lt;&amp;gt;2000 &lt;BR /&gt;group by POQ.ITMREF_0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would load only 1 row per&amp;nbsp;POQ.ITMREF_0 and&lt;STRONG&gt; only&amp;nbsp; the data of the row with the min date&amp;nbsp;POQ.EXTRCPDAT_0&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;How can I set the script?&lt;/P&gt;
&lt;P&gt;Many thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Andrea&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 16:04:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-only-min-data-value-row/m-p/2029468#M1222312</guid>
      <dc:creator>andyrebs</dc:creator>
      <dc:date>2023-01-24T16:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: load only min  data value row</title>
      <link>https://community.qlik.com/t5/QlikView/load-only-min-data-value-row/m-p/2030093#M1222354</link>
      <description>&lt;P&gt;&lt;SPAN&gt;You can modify your query to include a subquery that selects the minimum date for each item, and then use that in the main query to filter the rows. Here's an example of how you can modify your query:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SQL select&lt;BR /&gt;max(POQ.ITMREF_0) as [Article],&lt;BR /&gt;max(POQ.QTYSTU_0) as [Qty 1°arr.],&lt;BR /&gt;min(POQ.EXTRCPDAT_0) as [1° Receiving Date ],&lt;BR /&gt;max(POQ.RCPQTYSTU_0) as [1° Qty Ric. For.]&lt;BR /&gt;//max(POQ.YDATARCVPR_0) as [1° Date Receiving Conf.]&lt;BR /&gt;from xxxx.yyyy.PORDERQ POQ&lt;BR /&gt;INNER JOIN (SELECT ITMREF_0, min(EXTRCPDAT_0) as min_date from xxxx.yyyy.PORDERQ where POQ.QTYSTU_0-POQ.RCPQTYSTU_0 &amp;gt;0 and POQ.RCPCLEFLG_0 = 1 and year(POQ.YDATARCVPR_0)&amp;lt;&amp;gt;2000 group by ITMREF_0) subquery&lt;BR /&gt;ON POQ.ITMREF_0 = subquery.ITMREF_0 AND POQ.EXTRCPDAT_0 = subquery.min_date&lt;BR /&gt;where POQ.QTYSTU_0-POQ.RCPQTYSTU_0 &amp;gt;0 and POQ.RCPCLEFLG_0 = 1 and year(POQ.YDATARCVPR_0)&amp;lt;&amp;gt;2000&lt;BR /&gt;group by POQ.ITMREF_0&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The subquery selects the minimum date for each item and join it with the main query, filtering only the rows with the min date of each item.&lt;/P&gt;
&lt;P&gt;Please note that the query might require some adjustments depending on the specific structure and contents of the xxxx.yyyy.PORDERQ table.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 20:56:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-only-min-data-value-row/m-p/2030093#M1222354</guid>
      <dc:creator>jcmachado</dc:creator>
      <dc:date>2023-01-25T20:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: load only min  data value row</title>
      <link>https://community.qlik.com/t5/QlikView/load-only-min-data-value-row/m-p/2030514#M1222376</link>
      <description>&lt;P&gt;Hi &lt;SPAN&gt;jcmachado&lt;/SPAN&gt;,&lt;/P&gt;
&lt;P&gt;many thanks for your reply.&lt;/P&gt;
&lt;P&gt;I tested your subquery, it seems working!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Andrea&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 17:48:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-only-min-data-value-row/m-p/2030514#M1222376</guid>
      <dc:creator>andyrebs</dc:creator>
      <dc:date>2023-01-26T17:48:18Z</dc:date>
    </item>
  </channel>
</rss>

