<?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: Sum and FirstSortedvalue issue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009939#M528593</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Razor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As &lt;STRONG style="font-size: 11.6999998092651px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://community.qlik.com/people/Digvijay"&gt;Digvijay&lt;/A&gt;&lt;/STRONG&gt; indicated there are no duplicate values in the spreadsheet. If this is case then, you don't even need to use FirstSortedValue() at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let us know if you have any further questions or samples.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Aug 2015 12:43:46 GMT</pubDate>
    <dc:creator>sinanozdemir</dc:creator>
    <dc:date>2015-08-28T12:43:46Z</dc:date>
    <item>
      <title>Sum and FirstSortedvalue issue</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009928#M528582</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;I have a chart that has one dimension called PID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have several expressions (5) in total that are of the form&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cost = Firstsortedvalue({&amp;lt;YearMonth = &amp;gt;} Cost, -StartDate)&lt;/P&gt;&lt;P&gt;Status = Firstsortedvalue({&amp;lt;YearMonth = &amp;gt;} Status, -StartDate)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would only like to have one row for each PID and the firstsorted value gives me the latest row as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to do a sum in two textboxes to display the costs for all "Expired" statuses one for all "Active" statuses and I am unable to get it to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached my table with some comments to make it easier to understand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2015 14:37:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009928#M528582</guid>
      <dc:creator />
      <dc:date>2015-08-27T14:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and FirstSortedvalue issue</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009929#M528583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Razor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There you go:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/97179_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Expression for active:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/97180_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Expression for expired:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/97181_Capture.PNG" style="height: 251px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2015 15:28:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009929#M528583</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2015-08-27T15:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and FirstSortedvalue issue</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009930#M528584</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;Thanks for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works, but keep in my mind, my original table chart has rows with repeated PIDs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e PID Cost Status&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Inactive&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Inactive&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Active&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The firstsorted value is what cleaned the data to only give me the latest value i.e. a row like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PID Cost Status&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Active&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your expression is doing a sum of the active or expired but it doesn't take into account that I only want to sum the values for the latest row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this makes sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your help so far&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2015 16:21:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009930#M528584</guid>
      <dc:creator />
      <dc:date>2015-08-27T16:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and FirstSortedvalue issue</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009931#M528585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, if your problem is more complex than this, then I suggest you post a more comprehensive data-set. Although, one possible solution could be changing the set analysis to the below one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;='Active: ' &amp;amp; Sum({&amp;lt;Status = {"=&lt;STRONG style="color: #ff0000;"&gt;Aggr(FirstSortedValue(Status,-[Start Date]), PID)&lt;/STRONG&gt;='Active'"}&amp;gt;}Cost)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a result of this, you aggregating FirstSortedValue by PID and getting the latest record per PID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2015 17:08:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009931#M528585</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2015-08-27T17:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and FirstSortedvalue issue</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009932#M528586</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;='Cost with Expired Status : '&amp;amp; Sum({&amp;lt;Status={'Expired'}&amp;gt;}Aggr(FirstSortedValue(Cost,-[Start Date]),PID))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2015 17:59:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009932#M528586</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2015-08-27T17:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and FirstSortedvalue issue</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009933#M528587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Digvijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your answer should give me exactly what I want, but I have noticed that for some statuses it gives me the right sum and for other statuses, the sum is wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apart from that, your expression seems almost perfect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2015 08:47:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009933#M528587</guid>
      <dc:creator />
      <dc:date>2015-08-28T08:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and FirstSortedvalue issue</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009934#M528588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sinan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help so far.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I add the aggr part in red, it results in 0. I think the expression doesn't evaluate correctly for the status&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2015 08:48:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009934#M528588</guid>
      <dc:creator />
      <dc:date>2015-08-28T08:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and FirstSortedvalue issue</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009935#M528589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would be great if you can share the sample test data where you are getting wrong results, I just tested thru attached test file but couldn't generate the problem you have mentioned.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2015 09:20:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009935#M528589</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2015-08-28T09:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and FirstSortedvalue issue</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009936#M528590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached a copy with new data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help on this would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2015 10:31:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009936#M528590</guid>
      <dc:creator />
      <dc:date>2015-08-28T10:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and FirstSortedvalue issue</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009937#M528591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am still not able to figure out, also in your new data I didn't see duplicate PID with old/new start dates. I tried to match with Excel and the QVW it is showing equal distribution. Let me know thru attached QVW where we have mismatch. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2015 11:27:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009937#M528591</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2015-08-28T11:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and FirstSortedvalue issue</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009938#M528592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Forgot to change the label for last text box, that is for 'Unknown End Date'. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2015 11:30:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009938#M528592</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2015-08-28T11:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and FirstSortedvalue issue</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009939#M528593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Razor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As &lt;STRONG style="font-size: 11.6999998092651px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://community.qlik.com/people/Digvijay"&gt;Digvijay&lt;/A&gt;&lt;/STRONG&gt; indicated there are no duplicate values in the spreadsheet. If this is case then, you don't even need to use FirstSortedValue() at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let us know if you have any further questions or samples.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2015 12:43:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009939#M528593</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2015-08-28T12:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and FirstSortedvalue issue</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009940#M528594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have now attached the raw file which has multiple rows per PID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can have a look again at your convenience, I would really appreciate it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2015 13:01:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009940#M528594</guid>
      <dc:creator />
      <dc:date>2015-08-28T13:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and FirstSortedvalue issue</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009941#M528595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This works perfectly on your data -&lt;/P&gt;&lt;P&gt;Sum(Aggr(FirstSortedValue({&amp;lt;Status={'Expired'}&amp;gt;} Cost,-StartDate),PID))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I couldn't figure out why it doesn't work after making any selection, see the attached QVW.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2015 14:42:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009941#M528595</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2015-08-28T14:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and FirstSortedvalue issue</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009942#M528596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just add 1 in the Sum() function:&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;Sum(&lt;STRONG style="color: #ff0000;"&gt;{1}&lt;/STRONG&gt;Aggr(FirstSortedValue({&amp;lt;Status={'Expired'}&amp;gt;} Cost,-StartDate),PID))&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;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;It will ignore the selections.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2015 14:47:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009942#M528596</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2015-08-28T14:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and FirstSortedvalue issue</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009943#M528597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached a QVW with what I am looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your sums are correct, but the way it is summing up the values isn't the way I want it to sum the values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if one PID has expired 3 times in the past and now has one active, then it shouldn't sum anything under expired at all as it is now active.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached a QVW and a spreadsheet. If you filter on the spreadsheet for the relevant statuses and do a sum, those are the values I expect to see in my textbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this makes sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for all your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2015 16:04:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009943#M528597</guid>
      <dc:creator />
      <dc:date>2015-08-28T16:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and FirstSortedvalue issue</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009944#M528598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am calling an expert &lt;A href="https://community.qlik.com/qlik-users/171708"&gt;sunindia&lt;/A&gt;‌, I am sure he will solve this immediately.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2015 19:30:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009944#M528598</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2015-08-28T19:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and FirstSortedvalue issue</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009945#M528599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This expression seems to work for expired. Try it out:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({1}Aggr(If(FirstSortedValue(Status,-StartDate) = 'Expired', FirstSortedValue({&amp;lt;Status={'Expired'}&amp;gt;} Cost,-StartDate)),PID))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May need to modify the set analysis for selection requirement, but without selection it gives 24,109&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Aug 2015 07:45:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009945#M528599</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-08-29T07:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and FirstSortedvalue issue</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009946#M528600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey &lt;A _jive_internal="true" href="https://community.qlik.com/people/sinanozdemir"&gt;Sinan&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for considering me as an expert &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;, but I am just learning like you. I have proposed a solution, hopefully it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Aug 2015 07:46:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009946#M528600</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-08-29T07:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and FirstSortedvalue issue</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009947#M528601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is exactly what I want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks also to Sinan and Digvijay for all your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really appreciate it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Aug 2015 21:42:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-FirstSortedvalue-issue/m-p/1009947#M528601</guid>
      <dc:creator />
      <dc:date>2015-08-29T21:42:46Z</dc:date>
    </item>
  </channel>
</rss>

