<?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 function in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/FirstSortedValue-function/m-p/10029#M757</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This seems to work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FirstSortedValue({&amp;lt;CalculationGroup&amp;nbsp; = {'EOM Balance'}&amp;gt;} Aggr(Sum({&amp;lt;CalculationGroup&amp;nbsp; = {'EOM Balance'}&amp;gt;}Amount), TransactionDate), -Aggr(Only({&amp;lt;CalculationGroup&amp;nbsp; = {'EOM Balance'}&amp;gt;}TransactionDate), TransactionDate))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/193175_Capture.PNG" style="height: 122px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Feb 2018 17:21:03 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-02-12T17:21:03Z</dc:date>
    <item>
      <title>FirstSortedValue function</title>
      <link>https://community.qlik.com/t5/App-Development/FirstSortedValue-function/m-p/10024#M752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The data set is the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TransactionDate, TD_QuarterYear, CalculationGroup, LoanID, Amount&lt;/P&gt;&lt;P&gt;9/20/2017, 2017-Q3, 'FPD Point', 1122, $450&lt;/P&gt;&lt;P&gt;9/30/2017, 2017-Q3, 'EOM Balance',3324, $510 &lt;/P&gt;&lt;P&gt;10/30/2017, 2017-Q4, 'EOM Balance', 1243, $200&lt;/P&gt;&lt;P&gt;10/30/2017, 2017-Q4, 'FPD Point', 1110, $210&lt;/P&gt;&lt;P&gt;10/30/2017, 2017-Q4, 'EOM Balance', 2110, $430&lt;/P&gt;&lt;P&gt;11/2/2017, 2017-Q4, 'FPD Point', 2332, $102&lt;/P&gt;&lt;P&gt;11/3/2017, 2017-Q4, 'FPD Point', 1220, $140&lt;/P&gt;&lt;P&gt;12/20/2017, 2017-Q4, 'FPD Point', 1133, $210&lt;/P&gt;&lt;P&gt;12/30/2017, 2017-Q4, 'FPD Point', 2300, $100&lt;/P&gt;&lt;P&gt;12/31/2017, 2017-Q4, 'EOM Balance', 2220, $220&lt;/P&gt;&lt;P&gt;12/31/2017, 2017-Q4, 'EOM Balance', 3001, $200&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each quarter, I need to get the Sum of the amounts where the CalculationGroup = 'EOM Balance' and where the TransactionDate is the last day of the Quarter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My table has the quarter as a dimension but SUM(IF(CalculationGroup='EOM Balance', amount) will sum up all 'EOM Balance' for the entire quarter.&amp;nbsp; 'EOM Balance' means the End Of Month balance per loan, so when looking at the 'end of month balance' for a quarter, I only need to be looking at the end of month for the last month in the quarter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I looked at FirstSortedValue and tried:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FirstSortedValue( Sum( If( CalculationGroup = 'EOM Balance'), Amount), Max(TransactionDate) )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, this shows ' - ' and does not provide what is needed.&amp;nbsp; Any help is greatly appreciated, thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 16:31:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/FirstSortedValue-function/m-p/10024#M752</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-12T16:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue function</title>
      <link>https://community.qlik.com/t5/App-Development/FirstSortedValue-function/m-p/10025#M753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FirstSortedValue({&amp;lt;CalculationGroup&amp;nbsp; = {'EOM Balance'}&amp;gt;} Aggr(Sum({&amp;lt;CalculationGroup&amp;nbsp; = {'EOM Balance'}&amp;gt;}Amount), TransactionDate), -TransactionDate)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 16:34:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/FirstSortedValue-function/m-p/10025#M753</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-02-12T16:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue function</title>
      <link>https://community.qlik.com/t5/App-Development/FirstSortedValue-function/m-p/10026#M754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny,&amp;nbsp; but it keeps displaying that pesky ' - ' in the table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 16:38:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/FirstSortedValue-function/m-p/10026#M754</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-12T16:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue function</title>
      <link>https://community.qlik.com/t5/App-Development/FirstSortedValue-function/m-p/10027#M755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to share a sample app to look at this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 16:51:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/FirstSortedValue-function/m-p/10027#M755</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-02-12T16:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue function</title>
      <link>https://community.qlik.com/t5/App-Development/FirstSortedValue-function/m-p/10028#M756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a sample workbook but how do I upload it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The formula works if there is only 1 value for the last day of the quarter, like 9/30/2017 in the sample data set provided.&amp;nbsp; The formula shows $510 for Q3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It doesn’t work for quarters where there are multiple values on the last day, like 12/31/2017.&amp;nbsp; It should show $220 + $200 = $420, but it displays ' - '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Every quarter will have multiple values in the real world since each loan will have an ‘eom’ value.&amp;nbsp; All of these values have to be summed up for the last day, e.g. 12/31/2017.&amp;nbsp; Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD * Inline [&lt;/P&gt;&lt;P&gt;TransactionDate, TD_QuarterYear, CalculationGroup, LoanID, Amount&lt;/P&gt;&lt;P&gt;9/20/2017, 2017-Q3, 'FPD Point', 1122, $450&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;9/30/2017, 2017-Q3, 'EOM Balance',3324, $510&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;10/30/2017, 2017-Q4, 'EOM Balance', 1243, $200&lt;/P&gt;&lt;P&gt;10/30/2017, 2017-Q4, 'FPD Point', 1110, $210&lt;/P&gt;&lt;P&gt;10/30/2017, 2017-Q4, 'EOM Balance', 2110, $430&lt;/P&gt;&lt;P&gt;11/2/2017, 2017-Q4, 'FPD Point', 2332, $102&lt;/P&gt;&lt;P&gt;11/3/2017, 2017-Q4, 'FPD Point', 1220, $140&lt;/P&gt;&lt;P&gt;12/20/2017, 2017-Q4, 'FPD Point', 1133, $210&lt;/P&gt;&lt;P&gt;12/30/2017, 2017-Q4, 'FPD Point', 2300, $100&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;12/31/2017, 2017-Q4, 'EOM Balance', 2220, $220&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;12/31/2017, 2017-Q4, 'EOM Balance', 3001, $200&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;] (delimiter is ',');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 17:08:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/FirstSortedValue-function/m-p/10028#M756</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-12T17:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue function</title>
      <link>https://community.qlik.com/t5/App-Development/FirstSortedValue-function/m-p/10029#M757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This seems to work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FirstSortedValue({&amp;lt;CalculationGroup&amp;nbsp; = {'EOM Balance'}&amp;gt;} Aggr(Sum({&amp;lt;CalculationGroup&amp;nbsp; = {'EOM Balance'}&amp;gt;}Amount), TransactionDate), -Aggr(Only({&amp;lt;CalculationGroup&amp;nbsp; = {'EOM Balance'}&amp;gt;}TransactionDate), TransactionDate))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/193175_Capture.PNG" style="height: 122px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 17:21:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/FirstSortedValue-function/m-p/10029#M757</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-02-12T17:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue function</title>
      <link>https://community.qlik.com/t5/App-Development/FirstSortedValue-function/m-p/10030#M758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 17:30:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/FirstSortedValue-function/m-p/10030#M758</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-12T17:30:37Z</dc:date>
    </item>
  </channel>
</rss>

