<?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: Get only last suborder in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Get-only-last-suborder/m-p/892136#M999672</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;split the field into two fields, and then use max and group by to get your result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;order&lt;/P&gt;&lt;P&gt;max(orderid) as maxorderID&lt;/P&gt;&lt;P&gt;group by&lt;/P&gt;&lt;P&gt;order;&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;subfield(yourfield, '-', 1) as order,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;subfield(yourfield, '-', 2) as orderID&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;resident yourtable;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Jun 2015 14:20:52 GMT</pubDate>
    <dc:creator>giakoum</dc:creator>
    <dc:date>2015-06-15T14:20:52Z</dc:date>
    <item>
      <title>Get only last suborder</title>
      <link>https://community.qlik.com/t5/QlikView/Get-only-last-suborder/m-p/892135#M999671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an ordertable with original orders (-00) and subesequent suborders that are derived from the original order (-XX). Something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4112200&lt;/P&gt;&lt;P&gt;4112201&lt;/P&gt;&lt;P&gt;4112202&lt;/P&gt;&lt;P&gt;4455100&lt;/P&gt;&lt;P&gt;4456000&lt;/P&gt;&lt;P&gt;4667100&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;4667101&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;4667102&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;4667103&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;41122-00&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;41122-01&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;41122-02&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;44551-00&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;44560-00&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;46671-00&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;46671-01&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;46671-02&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;46671-03&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Now I want to render a table with only the max/last order suffix, in fact I don't want to load the lower numbered orders, rendering a table that would look like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;41122-02&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;44551-00&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;44560-00&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;46671-03&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;How can I achieve this ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;David&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 11:36:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-only-last-suborder/m-p/892135#M999671</guid>
      <dc:creator />
      <dc:date>2015-06-15T11:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: Get only last suborder</title>
      <link>https://community.qlik.com/t5/QlikView/Get-only-last-suborder/m-p/892136#M999672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;split the field into two fields, and then use max and group by to get your result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;order&lt;/P&gt;&lt;P&gt;max(orderid) as maxorderID&lt;/P&gt;&lt;P&gt;group by&lt;/P&gt;&lt;P&gt;order;&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;subfield(yourfield, '-', 1) as order,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;subfield(yourfield, '-', 2) as orderID&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;resident yourtable;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 14:20:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-only-last-suborder/m-p/892136#M999672</guid>
      <dc:creator>giakoum</dc:creator>
      <dc:date>2015-06-15T14:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: Get only last suborder</title>
      <link>https://community.qlik.com/t5/QlikView/Get-only-last-suborder/m-p/892137#M999673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this is what you need:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;MyTable:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Inline&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[&lt;BR /&gt; myField&lt;BR /&gt; 41122-00&lt;BR /&gt; 41122-01&lt;BR /&gt; 41122-02&lt;BR /&gt; 44551-00&lt;BR /&gt; 44560-00&lt;BR /&gt; 46671-00&lt;BR /&gt; 46671-01&lt;BR /&gt; 46671-02&lt;BR /&gt; 46671-03&lt;BR /&gt; ]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt; &lt;BR /&gt; Temp: &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;NoConcatenate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Left&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;myField&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,5) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Order&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Right&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;myField&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,2) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SubOrder&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; MyTable;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Left&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Join&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (Temp)&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Order&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SubOrder&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SubOrder&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, 'isMax' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;flag&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Temp &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Group&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;By&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Order&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 14:21:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-only-last-suborder/m-p/892137#M999673</guid>
      <dc:creator>alexandros17</dc:creator>
      <dc:date>2015-06-15T14:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: Get only last suborder</title>
      <link>https://community.qlik.com/t5/QlikView/Get-only-last-suborder/m-p/892138#M999674</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;if you always have the last two digits to consider, you can split those into a new field and then use the aggregation function max() on those.&lt;/P&gt;&lt;P&gt;Just keep in mind that you need a GROUP BY clause to encompass all othr fields that you have in your table.&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 14:22:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-only-last-suborder/m-p/892138#M999674</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2015-06-15T14:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Get only last suborder</title>
      <link>https://community.qlik.com/t5/QlikView/Get-only-last-suborder/m-p/892139#M999675</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;try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 14:27:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-only-last-suborder/m-p/892139#M999675</guid>
      <dc:creator>sorrakis01</dc:creator>
      <dc:date>2015-06-15T14:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Get only last suborder</title>
      <link>https://community.qlik.com/t5/QlikView/Get-only-last-suborder/m-p/892140#M999676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alessandro,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the code you presented, but I don't get the wanted result. &lt;/P&gt;&lt;P&gt;The resulting table still doesn't only contain the last suborder in the order series, but contain all orders.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I go about excluding the unwanted results in the final table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 14:32:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-only-last-suborder/m-p/892140#M999676</guid>
      <dc:creator />
      <dc:date>2015-06-15T14:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: Get only last suborder</title>
      <link>https://community.qlik.com/t5/QlikView/Get-only-last-suborder/m-p/892141#M999677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see attached&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 14:36:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-only-last-suborder/m-p/892141#M999677</guid>
      <dc:creator>giakoum</dc:creator>
      <dc:date>2015-06-15T14:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Get only last suborder</title>
      <link>https://community.qlik.com/t5/QlikView/Get-only-last-suborder/m-p/892142#M999678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add this code to the one I gave to you ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Final:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;NoConcatenate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Temp &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Where&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;flag&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 'isMax';&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;DROP&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Table&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Temp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 14:38:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-only-last-suborder/m-p/892142#M999678</guid>
      <dc:creator>alexandros17</dc:creator>
      <dc:date>2015-06-15T14:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: Get only last suborder</title>
      <link>https://community.qlik.com/t5/QlikView/Get-only-last-suborder/m-p/892143#M999679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Alessandro!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 06:08:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-only-last-suborder/m-p/892143#M999679</guid>
      <dc:creator />
      <dc:date>2015-06-16T06:08:48Z</dc:date>
    </item>
  </channel>
</rss>

