<?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 Last date data in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Last-date-data/m-p/224019#M76479</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;The following should work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum(If(Aggr(NODISTINCT Max(PayementWeek), [Customer ID]) = PayementWeek, Amount))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;FirstSortedValue will work as well.&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Apr 2011 11:31:35 GMT</pubDate>
    <dc:creator>Miguel_Angel_Baeyens</dc:creator>
    <dc:date>2011-04-20T11:31:35Z</dc:date>
    <item>
      <title>Last date data</title>
      <link>https://community.qlik.com/t5/QlikView/Last-date-data/m-p/224018#M76478</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;i'm having a problem that is maybe a bug or my idea might be wrong:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i ve a table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Customer ID / PayementWeek / Amount&lt;/P&gt;&lt;P&gt;234 / 201101 / 1200&lt;/P&gt;&lt;P&gt;234 / 201102 / 3000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;201101 as the first week of 2011&lt;/P&gt;&lt;P&gt;and my real table is with thousands registers starting in 2000 for more than 7000 customers...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and i need to show only the last line. (would be 201113 for this week... and the amount corresponding)&lt;/P&gt;&lt;P&gt;I have as dimensions: CustomerID and Amout&lt;/P&gt;&lt;P&gt;and as an expression: =aggr(Max(PayementDate),CustomerID)&lt;/P&gt;&lt;P&gt;but the Amount given is wrong and is taken like randomly in the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestion would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2011 11:14:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-date-data/m-p/224018#M76478</guid>
      <dc:creator />
      <dc:date>2011-04-20T11:14:12Z</dc:date>
    </item>
    <item>
      <title>Last date data</title>
      <link>https://community.qlik.com/t5/QlikView/Last-date-data/m-p/224019#M76479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;The following should work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum(If(Aggr(NODISTINCT Max(PayementWeek), [Customer ID]) = PayementWeek, Amount))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;FirstSortedValue will work as well.&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2011 11:31:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-date-data/m-p/224019#M76479</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-04-20T11:31:35Z</dc:date>
    </item>
    <item>
      <title>Last date data</title>
      <link>https://community.qlik.com/t5/QlikView/Last-date-data/m-p/224020#M76480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Muchissimas gracias Miguel, funciona la ostia &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2011 12:48:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-date-data/m-p/224020#M76480</guid>
      <dc:creator />
      <dc:date>2011-04-20T12:48:46Z</dc:date>
    </item>
    <item>
      <title>Last date data</title>
      <link>https://community.qlik.com/t5/QlikView/Last-date-data/m-p/224021#M76481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I might have something a bit more sneaky to solve &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the same table, imagine that the last Amount is equal to 0 and i wish to show the last transaction date and amount that is different from zero.&lt;/P&gt;&lt;P&gt;actually, you can have in this table a customer that have paid his last amount several weeks ago, you would have then several weeks with a 0 amount, but we want to know when is the last time he paid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is that possible as a dimesion? or should i create a new table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope i'm clear,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2011 13:32:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-date-data/m-p/224021#M76481</guid>
      <dc:creator />
      <dc:date>2011-04-20T13:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Last date data</title>
      <link>https://community.qlik.com/t5/QlikView/Last-date-data/m-p/224022#M76482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/17947#17947"&gt;This post&lt;/A&gt; is about something very similar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Considering this piece of script, simulating the case you specify:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;Customer ID, PayementWeek, Amount&lt;/P&gt;&lt;P&gt;234, 201101, 1200&lt;/P&gt;&lt;P&gt;234, 201102, 3000&lt;/P&gt;&lt;P&gt;234, 201103, 0&lt;/P&gt;&lt;P&gt;234, 201104, 0&lt;/P&gt;&lt;P&gt;234, 201105, 0];&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following expression should return the proper value (3000):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Sum(If(Aggr(NODISTINCT Max({&amp;lt; Amount = {'&amp;gt;0'} &amp;gt;} PayementWeek), [Customer ID]) = PayementWeek, Amount))&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not very happy with this, though, if your table is not huge it may do the trick.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2011 13:41:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-date-data/m-p/224022#M76482</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-04-20T13:41:26Z</dc:date>
    </item>
    <item>
      <title>Last date data</title>
      <link>https://community.qlik.com/t5/QlikView/Last-date-data/m-p/224023#M76483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Eres un maestro, thanx a lot, solved my issue perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2011 13:56:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-date-data/m-p/224023#M76483</guid>
      <dc:creator />
      <dc:date>2011-04-20T13:56:01Z</dc:date>
    </item>
  </channel>
</rss>

