<?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 sum the data based on the last date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453394#M434742</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;&lt;/P&gt;&lt;P&gt;I want to show the closing stock by warehousecode and productcode and date wise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when i try to sum it, if there is only one date, i am getting the closing stock as expected. But if there are multiple dates available i need to only the last value as closing stock for that particular data but i am getting all the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please have a look at the attached sample qvw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Jan 2018 07:52:17 GMT</pubDate>
    <dc:creator>vireshkolagimat</dc:creator>
    <dc:date>2018-01-11T07:52:17Z</dc:date>
    <item>
      <title>sum the data based on the last date</title>
      <link>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453394#M434742</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;&lt;/P&gt;&lt;P&gt;I want to show the closing stock by warehousecode and productcode and date wise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when i try to sum it, if there is only one date, i am getting the closing stock as expected. But if there are multiple dates available i need to only the last value as closing stock for that particular data but i am getting all the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please have a look at the attached sample qvw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 07:52:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453394#M434742</guid>
      <dc:creator>vireshkolagimat</dc:creator>
      <dc:date>2018-01-11T07:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: sum the data based on the last date</title>
      <link>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453395#M434743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi viresh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how do you know which one the last value is.&lt;/P&gt;&lt;P&gt;If there is a timestamp or a Transaction ID you can try an Expression like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;StockDateTime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'=max(StockDateTime)'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ClosingStock&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 08:22:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453395#M434743</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2018-01-11T08:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: sum the data based on the last date</title>
      <link>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453396#M434744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, yes even i tried the below expression and it looks good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;StockDate={$(=max(StockDate))}&amp;gt;}ClosingStock)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how we can make this in the edit script instead front end. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 08:31:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453396#M434744</guid>
      <dc:creator>vireshkolagimat</dc:creator>
      <dc:date>2018-01-11T08:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: sum the data based on the last date</title>
      <link>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453397#M434745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;add this to your script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;join&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ProductKey&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;StockDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;LastValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ClosingStock&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;LastClosingStock&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; data&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Group&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ProductKey&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;StockDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 08:42:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453397#M434745</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2018-01-11T08:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: sum the data based on the last date</title>
      <link>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453398#M434746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or, I guess &lt;A href="http://help.qlik.com/en-US/qlikview/12.1/Subsystems/Client/Content/Scripting/AggregationFunctions/firstsorted.htm" title="http://help.qlik.com/en-US/qlikview/12.1/Subsystems/Client/Content/Scripting/AggregationFunctions/firstsorted.htm"&gt;FirstSortedValue - script function ‒ QlikView&lt;/A&gt; would be better way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 09:51:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453398#M434746</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2018-01-11T09:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: sum the data based on the last date</title>
      <link>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453399#M434747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;whats the difference? Should be the same in both expressions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 10:06:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453399#M434747</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2018-01-11T10:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: sum the data based on the last date</title>
      <link>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453400#M434748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i tried lastvalue but not getting the data as expected. Need to check with FirstSortedValue&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 10:16:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453400#M434748</guid>
      <dc:creator>vireshkolagimat</dc:creator>
      <dc:date>2018-01-11T10:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: sum the data based on the last date</title>
      <link>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453401#M434749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you meant - firstvalue() VS firstsortedvalue(), then THERE ARE differences. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="statement" data-mc-conditions="Primary.NotToTranslate"&gt;&lt;STRONG&gt;&lt;EM&gt;FirstValue()&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt; &lt;/STRONG&gt;returns the value that was &lt;STRONG&gt;loaded&lt;/STRONG&gt; first from the records ... // depends on load order&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN class="statement" data-mc-conditions="Primary.NotToTranslate"&gt;&lt;STRONG&gt;FirstSortedValue()&lt;/STRONG&gt;&lt;/SPAN&gt; returns the value from the expression specified in &lt;SPAN class="statement" data-mc-conditions="Primary.NotToTranslate"&gt;value&lt;/SPAN&gt; that corresponds to the result of sorting the &lt;SPAN class="statement" data-mc-conditions="Primary.NotToTranslate"&gt;&lt;STRONG&gt;sort_weight&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; argument&lt;/STRONG&gt;....&amp;nbsp;&amp;nbsp; // depends on the parameter you pass ; in this case it would a date field.&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 10:21:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453401#M434749</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2018-01-11T10:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: sum the data based on the last date</title>
      <link>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453402#M434750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thats weird. i tested it and i got the right values.&lt;/P&gt;&lt;P&gt;ok try FirstSortedValue. I think you Need to set the rank Parameter to -1 to get the last value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 10:22:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453402#M434750</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2018-01-11T10:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: sum the data based on the last date</title>
      <link>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453403#M434751</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 used the below script but still it is combining the all values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Directory;&lt;/P&gt;&lt;P&gt;LOAD ProductKey, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WarehouseCode, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProductCode, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StockDate, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OpeningStock, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TransactionQty, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; firstsortedvalue(ClosingStock,StockDate) as ClosingStock&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[InvCalculation.QVD]&lt;/P&gt;&lt;P&gt;(qvd)&lt;/P&gt;&lt;P&gt;group by ProductKey, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WarehouseCode, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProductCode, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StockDate, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OpeningStock, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TransactionQty;&lt;/P&gt;&lt;P&gt;Let me if i missed out anything.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 10:34:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453403#M434751</guid>
      <dc:creator>vireshkolagimat</dc:creator>
      <dc:date>2018-01-11T10:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: sum the data based on the last date</title>
      <link>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453404#M434752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Directory;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD ProductKey,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WarehouseCode,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProductCode,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StockDate,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OpeningStock,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TransactionQty&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[InvCalculation.QVD](qvd);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Join&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Load&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;WarehouseCode,&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="; color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProductCode,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; firstsortedvalue(ClosingStock, -StockDate) as ClosingStock&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;[InvCalculation.QVD] (qvd)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;group by WarehouseCode, ProductCode;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If you want to consider the Day field as well in the result (like your UI result), you might have to create and include the same in joining table and group by clause;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 10:40:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453404#M434752</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2018-01-11T10:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: sum the data based on the last date</title>
      <link>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453405#M434753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi tried the above method but getting wrong value. for 12/31/2017 the closing stock value is 1275.084 but i am getting almost double the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attaching the qvw for your reference along with sample data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 11:10:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453405#M434753</guid>
      <dc:creator>vireshkolagimat</dc:creator>
      <dc:date>2018-01-11T11:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: sum the data based on the last date</title>
      <link>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453406#M434754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;data:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ProductKey&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;StockDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;KEY&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ProductKey&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;WarehouseCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ProductCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;StockDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;day&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;StockDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;day&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;OpeningStock&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TransactionQty&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ClosingStock&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; ;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;INLINE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[&lt;BR /&gt; ProductKey, WarehouseCode, ProductCode, StockDate, OpeningStock, TransactionQty, ClosingStock&lt;BR /&gt; A01-1110001, A01, 1110001, 31/12/2017, 0, 1275.084, 1275.084&lt;BR /&gt; A01-1110001, A01, 1110001, 09/01/2018, 1275.084, 0, 1275.084&lt;BR /&gt; A01-1110001, A01, 1110001, 09/01/2018, 1275.084, -2, 1273.084&lt;BR /&gt; A01-1110001, A01, 1110001, 09/01/2018, 1273.084, 0, 1273.084&lt;BR /&gt; A01-1110001, A01, 1110001, 09/01/2018, 1273.084, -2, 1271.084&lt;BR /&gt; A01-1110001, A01, 1110001, 09/01/2018, 1271.084, 0, 1271.084&lt;BR /&gt; A01-1110001, A01, 1110001, 09/01/2018, 1271.084, -3, 1268.084&lt;BR /&gt; A01-1110001, A01, 1110001, 09/01/2018, 1268.084, 0, 1268.084&lt;BR /&gt; A01-1110001, A01, 1110001, 09/01/2018, 1268.084, 5, 1273.084&lt;BR /&gt; A01-1110001, A01, 1110001, 09/01/2018, 1273.084, 11, 1284.084&lt;BR /&gt; A01-1110001, A01, 1110001, 09/01/2018, 1284.084, 7, 1291.084&lt;BR /&gt; ]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt; &lt;BR /&gt; LastValue:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ProductKey&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;StockDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;KEY&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;LastValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ClosingStock&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;LastClosingStock&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; data&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Group&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ProductKey&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;StockDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;then the expression&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;sum(&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;LastClosingStock&lt;/SPAN&gt;) Should return the desired value&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 11:25:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453406#M434754</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2018-01-11T11:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: sum the data based on the last date</title>
      <link>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453407#M434755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try doing this correction:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;firstsortedvalue(&lt;STRONG&gt;TransactionQty&lt;/STRONG&gt;, -StockDate) as ClosingStock&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 11:28:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453407#M434755</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2018-01-11T11:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: sum the data based on the last date</title>
      <link>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453408#M434756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, It works fine if test the above script independently. When i use the output of this script, the values are being added u and i am getting the cumulative sum instead of the day end stock value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the suggestion.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Jan 2018 09:37:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453408#M434756</guid>
      <dc:creator>vireshkolagimat</dc:creator>
      <dc:date>2018-01-14T09:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: sum the data based on the last date</title>
      <link>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453409#M434757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you share a sample qvw of that Situation?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jan 2018 06:35:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-the-data-based-on-the-last-date/m-p/1453409#M434757</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2018-01-15T06:35:12Z</dc:date>
    </item>
  </channel>
</rss>

