<?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: FirstSortedValue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245055#M622108</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny, PFA.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Dec 2016 17:16:28 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-12-28T17:16:28Z</dc:date>
    <item>
      <title>FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245043#M622096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;My requirement is to get only the records highlighted in yellow with the bold font as in the image attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Essentially if a record is amended the its ID get updated i.e ; followed by the number of times.So in such instances I only want the most recent update. thus the expression ;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;FIRSTSORTEDVALUE&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;AGGR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;SUM&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;DISTINCT&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;AMOUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;CLIENT&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)&lt;BR /&gt; ,&lt;BR /&gt; -&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;AGGR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;SUM&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;[AMENDMENT NUMBER]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;CLIENT&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)) &lt;/SPAN&gt;where Amendment number is derived as MID(ID,14,3)) AS [AMENDMENT NUMBER].&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;But unfortunately this fails to work for client's with no amendment like Moses, Victor just a few.&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Please help, Thanks&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;&lt;IMG alt="image.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/147825_image.PNG" style="height: 347px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2016 13:56:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245043#M622096</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-28T13:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245044#M622097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=FirstSortedValue(Aggr(Sum(DISTINCT AMOUNT) ,CLIENT), -&lt;STRONG style="font-size: 13.3333px;"&gt;Aggr&lt;/STRONG&gt;([AMENDMENT NUMBER], CLIENT))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2016 14:02:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245044#M622097</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-12-28T14:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245045#M622098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Subfield(ID &amp;amp;';1' , ';' ,2) AS [AMENDMENT NUMBER]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2016 14:05:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245045#M622098</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-12-28T14:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245046#M622099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is very smart Stefan &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;. I have not tested this, but this might work also?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #ff0000;"&gt;Alt(&lt;/SPAN&gt;Mid(ID,14,3))&lt;SPAN style="color: #ff0000;"&gt;, 1)&lt;/SPAN&gt; as [AMENDMENT NUMBER]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2016 14:09:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245046#M622099</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-12-28T14:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245047#M622100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Guys for the quick response, I also learnt something new.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However a client like Adeliade should show 3 records with a total amount of 450,252.00 and not 200,128.00&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 96px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="17" width="96"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 856px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="266"&gt;ADELIADE&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="114"&gt;TF1634818035&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-left: none;" width="96"&gt;200,128.00&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-left: none;" width="159"&gt;1,603.93&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-left: none;" width="110"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-left: none;" width="111"&gt;09/01/2017&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" style="border-top: none;"&gt;ADELIADE&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;TF1634890173&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;50,068.00&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;214.50&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;09/01/2017&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" style="border-top: none;"&gt;ADELIADE&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;TF1634898830&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;200,056.00&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1,603.55&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;09/01/2017&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2016 14:40:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245047#M622100</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-28T14:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245048#M622101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be you need a new ID field which is just like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Left(ID, 12) as New_ID&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=FirstSortedValue(Aggr(Sum(DISTINCT AMOUNT), CLIENT, New_ID), -&lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Aggr&lt;/STRONG&gt;([AMENDMENT NUMBER], CLIENT, New_ID))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2016 14:43:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245048#M622101</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-12-28T14:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245049#M622102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tried that but but did not avail....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2016 15:50:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245049#M622102</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-28T15:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245050#M622103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to share your qvw or a sample?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2016 15:51:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245050#M622103</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-12-28T15:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245051#M622104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your email please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2016 16:01:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245051#M622104</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-28T16:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245052#M622105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have added you as a connection and you should be able to send me a private message (PM). I can share my id on PM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2016 16:06:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245052#M622105</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-12-28T16:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245053#M622106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As request please find attached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2016 16:13:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245053#M622106</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-28T16:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245054#M622107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This seems like the data you have in the chart, I would rather look at the aggregated data or the your qvw application&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2016 16:25:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245054#M622107</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-12-28T16:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245055#M622108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny, PFA.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2016 17:16:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245055#M622108</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-28T17:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245056#M622109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This may be?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=FirstSortedValue(Aggr(SUM(DISTINCT AMOUNT),iCustomer_ID, NEW_ID, [AMENDMENT NUMBER]), -Aggr([AMENDMENT NUMBER], iCustomer_ID, NEW_ID, [AMENDMENT NUMBER]))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="147854" alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/147854_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2016 17:28:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1245056#M622109</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-12-28T17:28:15Z</dc:date>
    </item>
  </channel>
</rss>

