<?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 Help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/603468#M222981</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is it what you are looking for?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Feb 2014 00:53:18 GMT</pubDate>
    <dc:creator>MK_QSL</dc:creator>
    <dc:date>2014-02-19T00:53:18Z</dc:date>
    <item>
      <title>FirstSortedValue Help</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/603465#M222978</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;I'm having some trouble using FirstSortedValue and could use some help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following Tables: AccountInfo and BalanceInfo&lt;/P&gt;&lt;P&gt;AccountInfo looks like:&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 240px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="84"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Key&lt;/P&gt;&lt;/TD&gt;&lt;TD width="64"&gt;Account#&lt;/TD&gt;&lt;TD width="92"&gt;EffectiveDate&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;12301012012&lt;/TD&gt;&lt;TD align="right"&gt;123&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;1/1/2012&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;12401012012&lt;/TD&gt;&lt;TD align="right"&gt;124&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;1/1/2012&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;12302012012&lt;/TD&gt;&lt;TD align="right"&gt;123&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;2/1/2012&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Balanceinfo Looks like:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 240px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="84"&gt;Key&lt;/TD&gt;&lt;TD width="64"&gt;BaLID&lt;/TD&gt;&lt;TD width="64"&gt;Balance&lt;/TD&gt;&lt;TD width="92"&gt;Status&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;12301012012&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;TD align="right"&gt;3.00&lt;/TD&gt;&lt;TD&gt;Open&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;12301012012&lt;/TD&gt;&lt;TD align="right"&gt;2&lt;/TD&gt;&lt;TD align="right"&gt;5.00&lt;/TD&gt;&lt;TD&gt;Open&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD colspan="1"&gt;12401012012&lt;/TD&gt;&lt;TD colspan="1" style="text-align: right;"&gt;3&lt;/TD&gt;&lt;TD style="text-align: right;"&gt;15.00&lt;/TD&gt;&lt;TD colspan="1"&gt;Open&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;12401012012&lt;/TD&gt;&lt;TD align="right"&gt;4&lt;/TD&gt;&lt;TD align="right"&gt;10.00&lt;/TD&gt;&lt;TD&gt;Open&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;12302012012&lt;/TD&gt;&lt;TD align="right"&gt;5&lt;/TD&gt;&lt;TD align="right"&gt;15.00&lt;/TD&gt;&lt;TD&gt;Open&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;12302012012&lt;/TD&gt;&lt;TD align="right"&gt;6&lt;/TD&gt;&lt;TD align="right"&gt;20.00&lt;/TD&gt;&lt;TD&gt;Closed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;12302012012&lt;/TD&gt;&lt;TD align="right"&gt;7&lt;/TD&gt;&lt;TD align="right"&gt;30.00&lt;/TD&gt;&lt;TD&gt;Open&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a 1:M relationship between Account and Balance Info.&amp;nbsp; I'd like to be able to return the count and balances associated with the most recent open accounts.&amp;nbsp; So for Account 123 I would return count of 2 and balance of 45.&amp;nbsp; For account 124 I would want to return count of 2 and balance of 25.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm currently using sum((AGGR(firstsortedvalue({&amp;lt;Status={'Open'}&amp;gt;}Balance,-EffectiveDate),Account))) to calculate the total Balance, which seems to work, but I can't figure out how to determine the count.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assumed using firstsortedvalue would be the way to go, but I am open to other suggestions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 21:59:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/603465#M222978</guid>
      <dc:creator />
      <dc:date>2014-02-18T21:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue Help</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/603466#M222979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Chris,&lt;/P&gt;&lt;P&gt;Its simple if you do the manipulations on the back-end.&lt;/P&gt;&lt;P&gt;Check out the attached file and see if it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;AJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 22:38:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/603466#M222979</guid>
      <dc:creator />
      <dc:date>2014-02-18T22:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue Help</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/603467#M222980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&amp;nbsp; I need execute the expression on the front end though, as I would like the count / balance info to update base don user's selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any insight on how I could accomplish this on the front end?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 23:27:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/603467#M222980</guid>
      <dc:creator />
      <dc:date>2014-02-18T23:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue Help</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/603468#M222981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is it what you are looking for?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 00:53:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/603468#M222981</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-02-19T00:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue Help</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/603469#M222982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not quite.&amp;nbsp; for Account 123, only the most recent records (from 2/1//2012) should be displayed.&amp;nbsp; With no selections the expression should ignore records from 1/1/2012 for account 123, and pick them up for Account 124.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 01:42:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/603469#M222982</guid>
      <dc:creator />
      <dc:date>2014-02-19T01:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue Help</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/603470#M222983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What I did was just join the two tables as per your logic. It will change per users selection. The calculations are still made on the front end. All thats being done is just group by and join which shouldn't affect the results.&lt;/P&gt;&lt;P&gt;Can you give an example if you think its not working when user makes a selection?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 01:58:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/603470#M222983</guid>
      <dc:creator />
      <dc:date>2014-02-19T01:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue Help</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/603471#M222984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I added a multi box containing effective date.&amp;nbsp; When i select 40909 (1/1/2012) I would like to see Account 124 with a balance of 25 and count of 2, which your solution does.&amp;nbsp; But based on my selction of 1/2/2012 I would like to see Account 123 with a count of 2 and balance of 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Essentially based on the users selection the balances associated with the most recent effect date should be displayed. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 02:19:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/603471#M222984</guid>
      <dc:creator />
      <dc:date>2014-02-19T02:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue Help</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/603472#M222985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do you get 8 when you select 2/1/2012. Can you please elaborate?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 03:33:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/603472#M222985</guid>
      <dc:creator />
      <dc:date>2014-02-19T03:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue Help</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/603473#M222986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi chris Please find Attachment i some what improved doc of Manish&lt;/P&gt;&lt;P&gt;hpoe this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 06:21:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/603473#M222986</guid>
      <dc:creator />
      <dc:date>2014-02-19T06:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue Help</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/603474#M222987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figured out the solution I was looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is what I used for the Balance&lt;/P&gt;&lt;P&gt;Firstsortedvalue(AGGR(sum({&amp;lt;Status={'Open'}&amp;gt;}Balance),EffectiveDate,Account),-AGGR((EffectiveDate), Account, EffectiveDate)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and count:&lt;/P&gt;&lt;P&gt;Firstsortedvalue(AGGR(Count({&amp;lt;Status={'Open'}&amp;gt;}Balance),EffectiveDate,Account),-AGGR((EffectiveDate), Account, EffectiveDate)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks very much for your help and suggestions!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Updated 3/5/14 per Manish's comments.&amp;nbsp; I mistakenly omitted that Status should be Open.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Feb 2014 19:12:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/603474#M222987</guid>
      <dc:creator />
      <dc:date>2014-02-22T19:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue Help</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/603475#M222988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if u found Solution&amp;nbsp; then please mark this Discussion as answered&lt;/P&gt;&lt;P&gt;so it will help those who are facing same type of problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks And regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Feb 2014 09:44:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/603475#M222988</guid>
      <dc:creator />
      <dc:date>2014-02-23T09:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue Help</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/603476#M222989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are glad that you found your solution.&lt;/P&gt;&lt;P&gt;Just for curiosity, what was wrong in our solution?&lt;/P&gt;&lt;P&gt;After checking your solution, found that it will not work for Status Open as your have given generalized answer and nowhere mentioned Status = OPEN !!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you check our solutions also and match with your one so that you can identify what was wrong /&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 06:44:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/603476#M222989</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-03-03T06:44:55Z</dc:date>
    </item>
  </channel>
</rss>

