<?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 issue with aggregation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/issue-with-aggregation/m-p/216392#M69709</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can any one help me on this issue.&lt;/P&gt;&lt;P&gt;my main concern is to load records from table for only max date&lt;/P&gt;&lt;P&gt;Hope someone can help me out in this issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Jul 2010 11:53:30 GMT</pubDate>
    <dc:creator>ashfaq_haseeb</dc:creator>
    <dc:date>2010-07-07T11:53:30Z</dc:date>
    <item>
      <title>issue with aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/issue-with-aggregation/m-p/216391#M69708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table with matchtype, short item number, quantity received, DateReceived&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and when I load data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;LOAD&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;[Match Type]&lt;I&gt;,&lt;/I&gt;&lt;/P&gt;&lt;P&gt;[Short Item Number]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P style="font-style: italic"&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;[Quantity Received],&lt;/P&gt;&lt;P&gt;[Date Received]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;path&amp;gt;\PurchaseOrderLastReceived.qvd&lt;/P&gt;&lt;I&gt;&lt;/I&gt;&lt;P style="font-style: italic"&gt;(&lt;/P&gt;&lt;P&gt;&lt;/P&gt;qvd&lt;I&gt;)&lt;/I&gt; &lt;B&gt;where&lt;/B&gt; [Short Item Number]&lt;I&gt;=&lt;/I&gt;'93285' &lt;B&gt;and&lt;/B&gt; [Match Type] &lt;I&gt;=&lt;/I&gt;'1';&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the output is like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Match Type&lt;/STRONG&gt; &lt;STRONG&gt;Short Item Number&lt;/STRONG&gt; quantity received date Received&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 93285 1000 100184&lt;/P&gt;&lt;P&gt;1 93285 18000 100185&lt;/P&gt;&lt;P&gt;1 93285 370 100026&lt;/P&gt;&lt;P&gt;1 93285 37745 101182&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now what i want is for max date in table i should load that record only i.e here max date is 101182 so I want to fetch that particular record only not all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How wouls i do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i do group by see below.&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;LOAD&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;[Match Type]&lt;I&gt;,&lt;/I&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;[Short Item Number]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;,&lt;/I&gt; &lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;sum([Quantity Received]) as [Quantity Received],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;max([Date Received]) as [Date Received],&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;FROM&lt;/B&gt;&lt;/P&gt;&lt;P&gt;C:\Users\user1\Desktop\Developement\Centralized\Daily\Ashfaq\PurchaseOrderLastReceived.qvd&lt;/P&gt;&lt;I&gt;&lt;/I&gt;&lt;P style="font-style: italic"&gt;(&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;group by [Match Type],[Short Item Number];&lt;/P&gt;qvd&lt;I&gt;)&lt;/I&gt; &lt;B&gt;where&lt;/B&gt; [Short Item Number]&lt;I&gt;=&lt;/I&gt;'93285' &lt;B&gt;and&lt;/B&gt; [Match Type] &lt;I&gt;=&lt;/I&gt;'1';&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;it add up all the quantity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i need to load only 1 record with max date.&lt;/P&gt;&lt;P&gt;How would i do that.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ashfaq&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jul 2010 09:24:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/issue-with-aggregation/m-p/216391#M69708</guid>
      <dc:creator>ashfaq_haseeb</dc:creator>
      <dc:date>2010-07-07T09:24:09Z</dc:date>
    </item>
    <item>
      <title>issue with aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/issue-with-aggregation/m-p/216392#M69709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can any one help me on this issue.&lt;/P&gt;&lt;P&gt;my main concern is to load records from table for only max date&lt;/P&gt;&lt;P&gt;Hope someone can help me out in this issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jul 2010 11:53:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/issue-with-aggregation/m-p/216392#M69709</guid>
      <dc:creator>ashfaq_haseeb</dc:creator>
      <dc:date>2010-07-07T11:53:30Z</dc:date>
    </item>
    <item>
      <title>issue with aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/issue-with-aggregation/m-p/216393#M69710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try the following...&lt;/P&gt;&lt;P&gt;Sort(Order by) the data on date field and load it. Then use the PEEK() function to get it even into a variable using the RESIDENT of the prevously loaded table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jul 2010 12:14:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/issue-with-aggregation/m-p/216393#M69710</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2010-07-07T12:14:47Z</dc:date>
    </item>
    <item>
      <title>issue with aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/issue-with-aggregation/m-p/216394#M69711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;STRONG&gt;tresesco&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;thanks for your reply. This is not whta i'm looking for&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;i want to load only those fields with max date at sql level itself.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;how can i do that any ideas?&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jul 2010 12:28:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/issue-with-aggregation/m-p/216394#M69711</guid>
      <dc:creator>ashfaq_haseeb</dc:creator>
      <dc:date>2010-07-07T12:28:45Z</dc:date>
    </item>
    <item>
      <title>issue with aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/issue-with-aggregation/m-p/216395#M69712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;see if this example is helpful for you.&lt;/P&gt;&lt;P&gt;The idea is load actual records first and than do the aggregation.&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;P&gt;Rainer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jul 2010 12:55:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/issue-with-aggregation/m-p/216395#M69712</guid>
      <dc:creator />
      <dc:date>2010-07-07T12:55:57Z</dc:date>
    </item>
    <item>
      <title>issue with aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/issue-with-aggregation/m-p/216396#M69713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rainer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply man.&lt;/P&gt;&lt;P&gt;I followed the script provided by you.&lt;/P&gt;&lt;P&gt;but its not working for me. I have attached a sample here.&lt;/P&gt;&lt;P&gt;but in output i should get 0ne record like you but i'm getting 5 records can u tell me what's wrong in it.&lt;/P&gt;&lt;P&gt;I should get only 1 recrd in table like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1, 932855, 37745, 101182&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;I really appreciate your concern man.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Ashfaq&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jul 2010 14:32:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/issue-with-aggregation/m-p/216396#M69713</guid>
      <dc:creator>ashfaq_haseeb</dc:creator>
      <dc:date>2010-07-07T14:32:42Z</dc:date>
    </item>
    <item>
      <title>issue with aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/issue-with-aggregation/m-p/216397#M69714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Load&lt;BR /&gt;&lt;BR /&gt; Match_type as New_Match,&lt;BR /&gt; SHTINO as New_SHTINO,&lt;BR /&gt; Qty as New_Qty,&lt;BR /&gt; Date as New_Date&lt;BR /&gt;Resident Temp_Customer&lt;BR /&gt;Where Match_type &amp;lt;&amp;gt; Previous(Match_type) //find the actual records&lt;BR /&gt;Order By Qty, Date DESC; //Sort the table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are using qty to check with previous value .it is having different values ,thats why its loading all the data. if u use Match_type , it will only load one data or if u r using SHTINO , it will load only two values. In Match_type, all the values are same and In SHTINO,only two different values. Hope this will help u...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jul 2010 15:10:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/issue-with-aggregation/m-p/216397#M69714</guid>
      <dc:creator />
      <dc:date>2010-07-07T15:10:26Z</dc:date>
    </item>
  </channel>
</rss>

