<?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 Order by &amp; Only in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Order-by-Only/m-p/735386#M474148</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I have say a date column and client no and other columns (client number duplicated). To extract the last transaction made by a client, can I say order by then use "Only" for each line that I am uploading?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;H&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Oct 2014 12:37:08 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-10-01T12:37:08Z</dc:date>
    <item>
      <title>Order by &amp; Only</title>
      <link>https://community.qlik.com/t5/QlikView/Order-by-Only/m-p/735386#M474148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I have say a date column and client no and other columns (client number duplicated). To extract the last transaction made by a client, can I say order by then use "Only" for each line that I am uploading?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;H&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 12:37:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Order-by-Only/m-p/735386#M474148</guid>
      <dc:creator />
      <dc:date>2014-10-01T12:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: Order by &amp; Only</title>
      <link>https://community.qlik.com/t5/QlikView/Order-by-Only/m-p/735387#M474149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should use group by&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;client_no,&lt;/P&gt;&lt;P&gt;date(max(date)) as DateColumn&lt;/P&gt;&lt;P&gt;resident TableName&lt;/P&gt;&lt;P&gt;group by client_no;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Singh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 12:39:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Order-by-Only/m-p/735387#M474149</guid>
      <dc:creator />
      <dc:date>2014-10-01T12:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: Order by &amp; Only</title>
      <link>https://community.qlik.com/t5/QlikView/Order-by-Only/m-p/735388#M474150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use FirstSortedValue() function in script which is aggregated function&lt;/P&gt;&lt;P&gt;then Use Group By in Where Clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to write all fields in Group by clause which you are not using in aggregated function.&lt;/P&gt;&lt;P&gt;Or you can use Only() to avoid that field to write in Group By clause&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your expression like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FirstSortedValue(ClientNo,Date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 12:44:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Order-by-Only/m-p/735388#M474150</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2014-10-01T12:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: Order by &amp; Only</title>
      <link>https://community.qlik.com/t5/QlikView/Order-by-Only/m-p/735389#M474151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The group by clause; I am guessing assumes that for each client all the other columns that are being grouped by will have identical values?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My data is such that I have a client no, date column, and other fields which for each client may not be consistent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example lets say I have 4 entries for one client. Client no column will be the same for these 4, date column will be the same hence the max function which is fine, columns c to h may all be different for the 4 different transactions. When I do a group by using all the columns not included in the aggregation, I am still getting 4 columns back and I am assuming this is because of the differences in columns c to h?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I come up with one row for each client, purely based on the client no and picking up the max date, and what line corresponds with that max date?&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, 01 Oct 2014 12:58:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Order-by-Only/m-p/735389#M474151</guid>
      <dc:creator />
      <dc:date>2014-10-01T12:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Order by &amp; Only</title>
      <link>https://community.qlik.com/t5/QlikView/Order-by-Only/m-p/735390#M474152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post sample input and expected output?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 13:03:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Order-by-Only/m-p/735390#M474152</guid>
      <dc:creator>anbu1984</dc:creator>
      <dc:date>2014-10-01T13:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Order by &amp; Only</title>
      <link>https://community.qlik.com/t5/QlikView/Order-by-Only/m-p/735391#M474153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, let me prepare something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To avoid grouping by all fields, can I apply the first sorted value function to all the fields, based on the max date? (12 of them)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;H&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 13:16:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Order-by-Only/m-p/735391#M474153</guid>
      <dc:creator />
      <dc:date>2014-10-01T13:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: Order by &amp; Only</title>
      <link>https://community.qlik.com/t5/QlikView/Order-by-Only/m-p/735392#M474154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you can.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load ClientNo,FirstSortedValue(Date,-Date),FirstSortedValue(Amt,-Date),FirstSortedValue(Qty,-Date) Group by ClientNo;&lt;/P&gt;&lt;P&gt;Load ClientNo,Date#(Date,'M/D/YYYY') AS Date,Amt,Qty Inline [&lt;/P&gt;&lt;P&gt;ClientNo,Date,Amt,Qty&lt;/P&gt;&lt;P&gt;1,1/1/2014,10,12&lt;/P&gt;&lt;P&gt;1,1/20/2014,12,15&lt;/P&gt;&lt;P&gt;2,1/1/2014,10,12&lt;/P&gt;&lt;P&gt;2,1/20/2014,12,15 ];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 13:25:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Order-by-Only/m-p/735392#M474154</guid>
      <dc:creator>anbu1984</dc:creator>
      <dc:date>2014-10-01T13:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Order by &amp; Only</title>
      <link>https://community.qlik.com/t5/QlikView/Order-by-Only/m-p/735393#M474155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect Anbu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you very very much, works like a dream!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 15:08:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Order-by-Only/m-p/735393#M474155</guid>
      <dc:creator />
      <dc:date>2014-10-01T15:08:32Z</dc:date>
    </item>
  </channel>
</rss>

