<?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: sum only last value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/sum-only-last-value/m-p/779825#M276356</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ariel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please see attached, I think that is giving you the answer you are looking for. Sums all the dates you select single or multiple, or the last in the period for year/month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope that helps&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Feb 2015 15:33:31 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-02-24T15:33:31Z</dc:date>
    <item>
      <title>sum only last value</title>
      <link>https://community.qlik.com/t5/QlikView/sum-only-last-value/m-p/779822#M276353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all experts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have in a table fields: Date,&amp;nbsp; Month, Year, Name,&amp;nbsp; Balance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to show in a line chart the sum(balance) of the period.&lt;/P&gt;&lt;P&gt;In the chart i have date cycle group: Data, Month, Year&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i choose Date - Sum(Balance) do the work!&lt;/P&gt;&lt;P&gt;but in i choose month or year I need to sum the balance of the last date of the period ex.&lt;/P&gt;&lt;P&gt;2013 - will show the sum of balance at Date 31/12/13&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;2014 - will show the sum of balance at Date 31/12/14&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;2015 - will show the sum of balance at Date 18/02/15 - the last Date i Have&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;2014-02 &lt;SPAN style="font-size: 13.3333330154419px;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt; will show the sum of balance at Date 28/02/2014&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;2015-01 -&lt;SPAN style="font-size: 13.3333330154419px;"&gt; will show the sum of balance at Date 31/01/2015&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;2015-02 -&lt;SPAN style="font-size: 13.3333330154419px;"&gt; will show the sum of balance at Date 18/02/2015&lt;SPAN style="font-size: 13.3333330154419px;"&gt; - the last Date i Have&lt;/SPAN&gt;&lt;/SPAN&gt;&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;I attached a file &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&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Does &lt;/SPAN&gt;anyone&lt;SPAN style="font-size: 13.3333330154419px;"&gt; have an idea how to &lt;/SPAN&gt;accomplish&lt;SPAN style="font-size: 13.3333330154419px;"&gt; that?&lt;/SPAN&gt;&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;Ariel&lt;BR /&gt;&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;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Feb 2015 14:22:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-only-last-value/m-p/779822#M276353</guid>
      <dc:creator>ariel_klien</dc:creator>
      <dc:date>2015-02-24T14:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: sum only last value</title>
      <link>https://community.qlik.com/t5/QlikView/sum-only-last-value/m-p/779823#M276354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use this expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(GetFieldSelections(Date), &lt;/P&gt;&lt;P&gt;&amp;nbsp; SUM(Balance),&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(GetFieldSelections(Year), &lt;/P&gt;&lt;P&gt;&amp;nbsp; SUM({&amp;lt;Date = {"$(=Max({&amp;lt;Year = {'$(=max(Year))'}&amp;gt;}Date))"}&amp;gt;}Balance),&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(LEN(GetFieldSelections(Month))&amp;gt;0,&lt;/P&gt;&lt;P&gt;&amp;nbsp; SUM({&amp;lt;Date = {"$(=MonthEnd(MakeDate(Left(Month,4),SubField(Month,'-',-1))))"}&amp;gt;}Balance)&lt;/P&gt;&lt;P&gt;&amp;nbsp; )))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Feb 2015 14:49:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-only-last-value/m-p/779823#M276354</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-02-24T14:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: sum only last value</title>
      <link>https://community.qlik.com/t5/QlikView/sum-only-last-value/m-p/779824#M276355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manish,&lt;/P&gt;&lt;P&gt;Thanks for the Quick answer, but i'm not looking for 1 value i want the make a compare chart.&lt;/P&gt;&lt;P&gt;I need to compare years.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;so, if in my X bar will put Year i will see 2013 2014 2015 but the sum(balance) will sum the 31/12/2013&amp;nbsp; 31/12/2014&amp;nbsp; 18/02/2015&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ariel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Feb 2015 14:56:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-only-last-value/m-p/779824#M276355</guid>
      <dc:creator>ariel_klien</dc:creator>
      <dc:date>2015-02-24T14:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: sum only last value</title>
      <link>https://community.qlik.com/t5/QlikView/sum-only-last-value/m-p/779825#M276356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ariel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please see attached, I think that is giving you the answer you are looking for. Sums all the dates you select single or multiple, or the last in the period for year/month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope that helps&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Feb 2015 15:33:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-only-last-value/m-p/779825#M276356</guid>
      <dc:creator />
      <dc:date>2015-02-24T15:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: sum only last value</title>
      <link>https://community.qlik.com/t5/QlikView/sum-only-last-value/m-p/779826#M276357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joe.&lt;/P&gt;&lt;P&gt;Thanks for your answer but still i cant compare between years or months it give me 1 value.&lt;/P&gt;&lt;P&gt;If i chose in the group "Date" - Year. i want to see:&lt;/P&gt;&lt;P&gt;in 2013 the sum(Balance) of 31/12/2013 &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;in 2014 the sum(Balance) of 31/12/2014 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;in 2015 the sum(Balance) of 18/02/2015 &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;now i can only see the balance in 2015.&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;BR&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;Ariel&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Feb 2015 16:01:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-only-last-value/m-p/779826#M276357</guid>
      <dc:creator>ariel_klien</dc:creator>
      <dc:date>2015-02-24T16:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: sum only last value</title>
      <link>https://community.qlik.com/t5/QlikView/sum-only-last-value/m-p/779827#M276358</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 found a partial solution:&lt;/P&gt;&lt;P&gt;in the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;Table_Temp:&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;LOAD Date, &lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp; Year&amp;amp;'-'&amp;amp;num(month(Date)) as Month,&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year, &lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name, &lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Balance&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;FROM .\Balance_Test.xls (biff, embedded labels, table is Sheet1$);&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;Max_Date:&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;LOAD Max(Date) as Max_T&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;Resident Table_Temp;&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;Let vMaxDate=Peek('Max_T');&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;Drop Table Max_Date;&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;Table:&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;LOAD *,&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp; if(Date=floor(MonthEnd(Date)) or Date='$(vMaxDate)',1,0) as Month_End,&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp; if(Date=floor(YearEnd(Date)) or Date='$(vMaxDate)',1,0) as Year_End&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;Resident Table_Temp;&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;drop Table Table_Temp;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in the chart:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(GetCurrentField(Dates)='Date',sum(Balance),&lt;/P&gt;&lt;P&gt;if(GetCurrentField(Dates)='Month',Sum({&amp;lt;Month_End={1}&amp;gt;}Balance),&lt;/P&gt;&lt;P&gt;if(GetCurrentField(Dates)='Year',Sum({&amp;lt;Year_End={1}&amp;gt;}Balance))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it is not dynamic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i chose the first 15 days of all months it will not show me the correct balance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Feb 2015 16:33:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-only-last-value/m-p/779827#M276358</guid>
      <dc:creator>ariel_klien</dc:creator>
      <dc:date>2015-02-24T16:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: sum only last value</title>
      <link>https://community.qlik.com/t5/QlikView/sum-only-last-value/m-p/779828#M276359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah right sorry so you want the change to occur based on your cycle group rather than what you actually select?&lt;/P&gt;&lt;P&gt;See attached think that is what you mean then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Feb 2015 16:34:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-only-last-value/m-p/779828#M276359</guid>
      <dc:creator />
      <dc:date>2015-02-24T16:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: sum only last value</title>
      <link>https://community.qlik.com/t5/QlikView/sum-only-last-value/m-p/779829#M276360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Joe!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Feb 2015 16:40:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-only-last-value/m-p/779829#M276360</guid>
      <dc:creator>ariel_klien</dc:creator>
      <dc:date>2015-02-24T16:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: sum only last value</title>
      <link>https://community.qlik.com/t5/QlikView/sum-only-last-value/m-p/779830#M276361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no worries, got what you meant in the end &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Feb 2015 16:41:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-only-last-value/m-p/779830#M276361</guid>
      <dc:creator />
      <dc:date>2015-02-24T16:41:31Z</dc:date>
    </item>
  </channel>
</rss>

