<?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 Getting the most recent transaction in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Getting-the-most-recent-transaction/m-p/181849#M47717</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;P&gt;Thanks for your suggestion which got me on the right track. The answer was:&lt;/P&gt;&lt;P style="font-style: italic"&gt;FirstSortedValue({&amp;lt;TaxStatus={'Cl'}&amp;gt;} Total &amp;lt;DealCode&amp;gt; BalanceRemaining, -ValueDate)&lt;/P&gt;&lt;P&gt;which works perfectly.&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Sep 2010 14:14:55 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2010-09-01T14:14:55Z</dc:date>
    <item>
      <title>Getting the most recent transaction</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-the-most-recent-transaction/m-p/181845#M47713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am having difficulty getting the most recent value of of 'BalanceRemaining' from a single table containing DealCode (key field), ValueDate and BalanceRemaining (among other fields of no importance here).&lt;BR /&gt;&lt;BR /&gt;I have a straight table using DealCode as dimension, and the following expressions (bear in mind that these expressions are for testing purposes). One deal is currently selected.&lt;/P&gt;&lt;UL&gt;&lt;/UL&gt;&lt;OL&gt;&lt;LI&gt;&lt;I&gt;Max(ValueDate)&lt;/I&gt; - works as expected giving the date for the most recent transaction for the deal 2010/08/31&lt;/LI&gt;&lt;LI&gt;&lt;I&gt;MonthStart(Max(ValueDate))&lt;/I&gt; - works as expected giving 2010/08/01&lt;/LI&gt;&lt;LI&gt;&lt;I&gt;MonthStart(Column(1))&lt;/I&gt; - works as expected giving 2010/08/01&lt;/LI&gt;&lt;LI&gt;&lt;I&gt;Count(If(ValueDate =Date( '2010/08/31'), BalanceRemaining))&lt;/I&gt; - works as expected giving 1 (never more than 1 per day)&lt;/LI&gt;&lt;LI&gt;&lt;I&gt;Count(If(ValueDate = Date(Column(1)), BalanceRemaining))&lt;/I&gt; - does NOT work (returns 0, should be 1)&lt;/LI&gt;&lt;LI&gt;&lt;I&gt;Count(If(ValueDate = Date(Max(ValueDate))), BalanceRemaining))&lt;/I&gt; - does NOT work (returns NULL)&lt;/LI&gt;&lt;/OL&gt;&lt;UL&gt;&lt;/UL&gt;&lt;P&gt;NOTE: when I have finished testing I will change the &lt;I&gt;Count&lt;/I&gt; to &lt;I&gt;Only&lt;/I&gt; to get the value of the BalanceRemaining field.&lt;BR /&gt;&lt;BR /&gt;My two questions are:&lt;BR /&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;What is the correct expression to get the BalanceRemaining for the last ValueDate for a DealCode (which is the table dimension)?&lt;/LI&gt;&lt;LI&gt;Why do expression 2, 3 &amp;amp; 4 above work, but not expressions 5 &amp;amp; 6. Especially seeing as expression 4 has the same syntax as 5 &amp;amp; 6.?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;BR /&gt;Many thanks&lt;BR /&gt;&lt;BR /&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Aug 2010 16:01:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-the-most-recent-transaction/m-p/181845#M47713</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2010-08-31T16:01:03Z</dc:date>
    </item>
    <item>
      <title>Getting the most recent transaction</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-the-most-recent-transaction/m-p/181846#M47714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;(Bump) Anyone?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Sep 2010 13:32:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-the-most-recent-transaction/m-p/181846#M47714</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2010-09-01T13:32:59Z</dc:date>
    </item>
    <item>
      <title>Getting the most recent transaction</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-the-most-recent-transaction/m-p/181847#M47715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) FirstSortedValue() might work for you here.&lt;/P&gt;&lt;P&gt;2) Assuming ValueDate is already a date, do you actually need the date() function? What is the actual value of ValueDate - is it 2010/08/31 ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Sep 2010 13:54:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-the-most-recent-transaction/m-p/181847#M47715</guid>
      <dc:creator />
      <dc:date>2010-09-01T13:54:31Z</dc:date>
    </item>
    <item>
      <title>Getting the most recent transaction</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-the-most-recent-transaction/m-p/181848#M47716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I think that the expression 6, need a "TOTAL" in the function MAX and you need verify the "(" and ")" because you have a 4 "(" and 5 ")"&lt;/P&gt;&lt;P&gt;COUNT(IF(ValueDate = Date(Max(TOTAL ValueDate) ), BalanceRemaining))&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Do you have a qvd example ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Sep 2010 14:02:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-the-most-recent-transaction/m-p/181848#M47716</guid>
      <dc:creator />
      <dc:date>2010-09-01T14:02:50Z</dc:date>
    </item>
    <item>
      <title>Getting the most recent transaction</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-the-most-recent-transaction/m-p/181849#M47717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;P&gt;Thanks for your suggestion which got me on the right track. The answer was:&lt;/P&gt;&lt;P style="font-style: italic"&gt;FirstSortedValue({&amp;lt;TaxStatus={'Cl'}&amp;gt;} Total &amp;lt;DealCode&amp;gt; BalanceRemaining, -ValueDate)&lt;/P&gt;&lt;P&gt;which works perfectly.&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Sep 2010 14:14:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-the-most-recent-transaction/m-p/181849#M47717</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2010-09-01T14:14:55Z</dc:date>
    </item>
  </channel>
</rss>

