<?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: LOAD MAX DISTINCT ? DATE in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/LOAD-MAX-DISTINCT-DATE/m-p/750503#M1030511</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi pitutiti,you can use this expression in chart:&lt;/P&gt;&lt;P&gt;Sum(Aggr(If(Date=Max(Total &amp;lt;Position&amp;gt; Date), Sum(Qty)), Position, Date))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For a input data like this:&lt;/P&gt;&lt;P&gt;Date, Position, Qty&lt;/P&gt;&lt;P&gt;01/01/2015, 1, 200&lt;/P&gt;&lt;P&gt;01/02/2015, 1, 400&lt;/P&gt;&lt;P&gt;06/01/2015, 2, 100&lt;/P&gt;&lt;P&gt;05/02/2015, 2, 300&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will return:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/77193_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Feb 2015 12:14:48 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2015-02-05T12:14:48Z</dc:date>
    <item>
      <title>LOAD MAX DISTINCT ? DATE</title>
      <link>https://community.qlik.com/t5/QlikView/LOAD-MAX-DISTINCT-DATE/m-p/750500#M1030508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody, hope somebody can help me. I have a table with the following structure&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/77198_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;For the same position I have several Items movements and the quantity of the items. What I try to achieve is this table&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/77199_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;The one which contains the Qty per position and with the highest date. Do I have to do this while the scripts loads or can I do it later in a graphic with some kind of aggregation? &lt;/P&gt;&lt;P&gt;Thanks in advances&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Feb 2015 11:43:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/LOAD-MAX-DISTINCT-DATE/m-p/750500#M1030508</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-05T11:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: LOAD MAX DISTINCT ? DATE</title>
      <link>https://community.qlik.com/t5/QlikView/LOAD-MAX-DISTINCT-DATE/m-p/750501#M1030509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pitutiti,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create two variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Var1=max(Date)&lt;/P&gt;&lt;P&gt;Var2=min(Date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a straight chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 8pt;"&gt;&lt;STRONG&gt;if&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008000; font-size: 8pt;"&gt;Date&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008000; font-size: 8pt;"&gt;Variable1&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #008000; font-size: 8pt;"&gt;or&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #008000; font-size: 8pt;"&gt;Date&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008000; font-size: 8pt;"&gt;Variable2&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008000; font-size: 8pt;"&gt;Quantity&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension: Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in presentation tab:&lt;/P&gt;&lt;P&gt;tick suppress zero value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;KC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Feb 2015 11:53:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/LOAD-MAX-DISTINCT-DATE/m-p/750501#M1030509</guid>
      <dc:creator>jyothish8807</dc:creator>
      <dc:date>2015-02-05T11:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: LOAD MAX DISTINCT ? DATE</title>
      <link>https://community.qlik.com/t5/QlikView/LOAD-MAX-DISTINCT-DATE/m-p/750502#M1030510</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;Take Position as Dimension&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And in Exp1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only({&amp;lt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Date&lt;/SPAN&gt;=&amp;nbsp; {"=$(=Max([&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Date&lt;/SPAN&gt;]))"}&amp;gt;}Date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exp2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Only({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;=&amp;nbsp; {"=$(=Max([&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;]))"}&amp;gt;}Qty)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Hope this will Work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Joshmi&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Feb 2015 12:10:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/LOAD-MAX-DISTINCT-DATE/m-p/750502#M1030510</guid>
      <dc:creator />
      <dc:date>2015-02-05T12:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: LOAD MAX DISTINCT ? DATE</title>
      <link>https://community.qlik.com/t5/QlikView/LOAD-MAX-DISTINCT-DATE/m-p/750503#M1030511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi pitutiti,you can use this expression in chart:&lt;/P&gt;&lt;P&gt;Sum(Aggr(If(Date=Max(Total &amp;lt;Position&amp;gt; Date), Sum(Qty)), Position, Date))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For a input data like this:&lt;/P&gt;&lt;P&gt;Date, Position, Qty&lt;/P&gt;&lt;P&gt;01/01/2015, 1, 200&lt;/P&gt;&lt;P&gt;01/02/2015, 1, 400&lt;/P&gt;&lt;P&gt;06/01/2015, 2, 100&lt;/P&gt;&lt;P&gt;05/02/2015, 2, 300&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will return:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/77193_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Feb 2015 12:14:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/LOAD-MAX-DISTINCT-DATE/m-p/750503#M1030511</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-02-05T12:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: LOAD MAX DISTINCT ? DATE</title>
      <link>https://community.qlik.com/t5/QlikView/LOAD-MAX-DISTINCT-DATE/m-p/750504#M1030512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;KC, It doesn't work for me because I don't want to get the maximal date from the entire table, I want to get the maximal date of the small groups of rows where the field position have the same value.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;But now that I'm reviewing what I wrote I realize I made a mistake with the rows selected.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;The correct table is this one.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&lt;IMG class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/77211_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;Sorry for the mistake and thanks for your time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Feb 2015 12:36:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/LOAD-MAX-DISTINCT-DATE/m-p/750504#M1030512</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-05T12:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: LOAD MAX DISTINCT ? DATE</title>
      <link>https://community.qlik.com/t5/QlikView/LOAD-MAX-DISTINCT-DATE/m-p/750505#M1030513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ruben, but i want the single row, not the sum.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Feb 2015 12:41:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/LOAD-MAX-DISTINCT-DATE/m-p/750505#M1030513</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-05T12:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: LOAD MAX DISTINCT ? DATE</title>
      <link>https://community.qlik.com/t5/QlikView/LOAD-MAX-DISTINCT-DATE/m-p/750506#M1030514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If its only one row per max(Date) and position it will get only that row, try the expression and see if it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can see that each row it's showing data according to the input data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Feb 2015 12:45:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/LOAD-MAX-DISTINCT-DATE/m-p/750506#M1030514</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-02-05T12:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: LOAD MAX DISTINCT ? DATE</title>
      <link>https://community.qlik.com/t5/QlikView/LOAD-MAX-DISTINCT-DATE/m-p/750507#M1030515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;RESULT&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="77213" alt="1.jpg" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/77213_1.jpg" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SCRIPT&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;order by position and date desc&lt;/P&gt;&lt;P&gt;get only first position (max date by position)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;a:&lt;/P&gt;&lt;P&gt;load * inline [&lt;/P&gt;&lt;P&gt;Date, Position, Qty&lt;/P&gt;&lt;P&gt;01/02/2015, 1, 100&lt;/P&gt;&lt;P&gt;01/01/2015, 1, 200&lt;/P&gt;&lt;P&gt;05/02/2015, 1, 300&lt;/P&gt;&lt;P&gt;04/12/2014, 2, 150&lt;/P&gt;&lt;P&gt;06/01/2015, 2, 80&lt;/P&gt;&lt;P&gt;03/02/2015, 2, 50&lt;/P&gt;&lt;P&gt;01/12/2014, 3, 75,&lt;/P&gt;&lt;P&gt;15/01/2015, 3, 80&lt;/P&gt;&lt;P&gt;04/02/2015, 3, 90&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;final:&lt;/P&gt;&lt;P&gt;NoConcatenate load&lt;/P&gt;&lt;P&gt;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;Resident a&lt;/P&gt;&lt;P&gt;Where peek(Position)&amp;lt;&amp;gt;Position&lt;/P&gt;&lt;P&gt;order by Position, Date desc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table a;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Feb 2015 12:52:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/LOAD-MAX-DISTINCT-DATE/m-p/750507#M1030515</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-02-05T12:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: LOAD MAX DISTINCT ? DATE</title>
      <link>https://community.qlik.com/t5/QlikView/LOAD-MAX-DISTINCT-DATE/m-p/750508#M1030516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, you were right! Thanks a lot and sorry for the delay in my response.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 14:29:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/LOAD-MAX-DISTINCT-DATE/m-p/750508#M1030516</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-09T14:29:24Z</dc:date>
    </item>
  </channel>
</rss>

