<?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: YTD Sum which is the sum of latest one Year. (Jun-2020-Jul-2019) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/YTD-Sum-which-is-the-sum-of-latest-one-Year-Jun-2020-Jul-2019/m-p/1729013#M723199</link>
    <description>&lt;P&gt;Hi, the expression is:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;YearMonthDate={"&amp;gt;=$(=AddMonths(Max(YearMonthDate), -11))"}&amp;gt;} PREMIUM)&lt;/P&gt;&lt;P&gt;And I also craeted a YearMonthDate field as&amp;nbsp;MakeDate(Year(DATE), Month(DATE)).&lt;/P&gt;&lt;P&gt;You can change it to use the DATE field:&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;DATE={"&amp;gt;=$(=AddMonths(Max(DATE), -12))"}&amp;gt;} PREMIUM)&lt;/P&gt;</description>
    <pubDate>Sun, 19 Jul 2020 08:46:25 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2020-07-19T08:46:25Z</dc:date>
    <item>
      <title>YTD Sum which is the sum of latest one Year. (Jun-2020-Jul-2019)</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Sum-which-is-the-sum-of-latest-one-Year-Jun-2020-Jul-2019/m-p/1728969#M723196</link>
      <description>&lt;P&gt;Dear All&lt;/P&gt;&lt;P&gt;I need to calculate the premium of each ME&amp;nbsp; for the latest 12 Month that is from Jun-2020 down to July 2019. Not the sum of premium for the entire period.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Neville&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Sum-which-is-the-sum-of-latest-one-Year-Jun-2020-Jul-2019/m-p/1728969#M723196</guid>
      <dc:creator>nevilledhamsiri</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: YTD Sum which is the sum of latest one Year. (Jun-2020-Jul-2019)</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Sum-which-is-the-sum-of-latest-one-Year-Jun-2020-Jul-2019/m-p/1728973#M723197</link>
      <description>&lt;P&gt;Hi, but what you want to show? the table in green that is in excel? Sample attached&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jul 2020 09:17:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Sum-which-is-the-sum-of-latest-one-Year-Jun-2020-Jul-2019/m-p/1728973#M723197</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2020-07-18T09:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: YTD Sum which is the sum of latest one Year. (Jun-2020-Jul-2019)</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Sum-which-is-the-sum-of-latest-one-Year-Jun-2020-Jul-2019/m-p/1728988#M723198</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes. In short ,I need all MEs to have their figures for the period (July 2019 to Jun 2020). What I have coloured in green, is the period that should be considered for the premium calculation.If you can write an expression to capture the premium for the twelve Month period dynamically that is what I need. For eg, when we come to July 2020, the formula should be able to calculate the figures again for the latest 12 Months ( 2019 Aug to July 2020) etc.&lt;/P&gt;&lt;P&gt;Please&amp;nbsp; send me the expression on the body of the reply as I use personnel&amp;nbsp; edition.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jul 2020 15:22:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Sum-which-is-the-sum-of-latest-one-Year-Jun-2020-Jul-2019/m-p/1728988#M723198</guid>
      <dc:creator>nevilledhamsiri</dc:creator>
      <dc:date>2020-07-18T15:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: YTD Sum which is the sum of latest one Year. (Jun-2020-Jul-2019)</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Sum-which-is-the-sum-of-latest-one-Year-Jun-2020-Jul-2019/m-p/1729013#M723199</link>
      <description>&lt;P&gt;Hi, the expression is:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;YearMonthDate={"&amp;gt;=$(=AddMonths(Max(YearMonthDate), -11))"}&amp;gt;} PREMIUM)&lt;/P&gt;&lt;P&gt;And I also craeted a YearMonthDate field as&amp;nbsp;MakeDate(Year(DATE), Month(DATE)).&lt;/P&gt;&lt;P&gt;You can change it to use the DATE field:&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;DATE={"&amp;gt;=$(=AddMonths(Max(DATE), -12))"}&amp;gt;} PREMIUM)&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jul 2020 08:46:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Sum-which-is-the-sum-of-latest-one-Year-Jun-2020-Jul-2019/m-p/1729013#M723199</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2020-07-19T08:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: YTD Sum which is the sum of latest one Year. (Jun-2020-Jul-2019)</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Sum-which-is-the-sum-of-latest-one-Year-Jun-2020-Jul-2019/m-p/1729040#M723200</link>
      <description>&lt;P&gt;Hi Rubenmarin&lt;/P&gt;&lt;P&gt;Thanks a lot for the answer which is what I looked forward to. If possible please see how I could convert this calculation to arrive at a running range average. That is like for the latest twelve Months considered as we have got the premium for the said period, always at each Month it should reflects the average for eg ME Piyal should have his averages as below&lt;/P&gt;&lt;P&gt;2019&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; July&amp;nbsp; &amp;nbsp; 8450&lt;/P&gt;&lt;P&gt;2019&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Aug&amp;nbsp; &amp;nbsp; &amp;nbsp; 8150&lt;/P&gt;&lt;P&gt;2019&amp;nbsp; &amp;nbsp; &amp;nbsp; Sep&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;7850&lt;/P&gt;&lt;P&gt;2019&amp;nbsp; &amp;nbsp; &amp;nbsp;Oct&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6738&lt;/P&gt;&lt;P&gt;Following formula seems to be not produce expected results. It is due to something missing somewhere or otherwise?&lt;/P&gt;&lt;P&gt;SUM(AGGR(RangeAvg(ABOVE( Sum({&amp;lt;DATE={"&amp;gt;=$(=AddMonths(Max(DATE), -12))"}&amp;gt;} PREMIUM),0,RowNo())),BRANCH,TRAN_MONTH,ME,TRAN_YEAR))&lt;/P&gt;&lt;P&gt;Thanks for the solution provided in a very shorter expression!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Neville&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jul 2020 14:30:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Sum-which-is-the-sum-of-latest-one-Year-Jun-2020-Jul-2019/m-p/1729040#M723200</guid>
      <dc:creator>nevilledhamsiri</dc:creator>
      <dc:date>2020-07-19T14:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: YTD Sum which is the sum of latest one Year. (Jun-2020-Jul-2019)</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Sum-which-is-the-sum-of-latest-one-Year-Jun-2020-Jul-2019/m-p/1729059#M723201</link>
      <description>&lt;P&gt;Hi Neville,&lt;/P&gt;&lt;P&gt;A running 12M can be more trivky, set analysis is calculated before the rows, so row values is not affected, all rows will have the same date filtered.&lt;/P&gt;&lt;P&gt;One way can be using an asof table:&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/The-As-Of-Table/ba-p/1466130" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/The-As-Of-Table/ba-p/1466130&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Another way is having it precalculated in script but this is only possible if dimensions and selections can work with fixed precalculated values.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jul 2020 18:43:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Sum-which-is-the-sum-of-latest-one-Year-Jun-2020-Jul-2019/m-p/1729059#M723201</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2020-07-19T18:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: YTD Sum which is the sum of latest one Year. (Jun-2020-Jul-2019)</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Sum-which-is-the-sum-of-latest-one-Year-Jun-2020-Jul-2019/m-p/1729061#M723202</link>
      <description>&lt;P&gt;Also, if you use a YearMonth field instead of a field for year and another for month you can use an expression like:&lt;/P&gt;&lt;P&gt;RangeSum(Above(TOTAL Sum(PREMIUM), 0, RangeMin(Rowno(), 12)))&lt;/P&gt;&lt;P&gt;For this to work months should be consecutive so maybe you need to create data to fill missing year-months with zeros.&lt;/P&gt;&lt;P&gt;Ie, using&amp;nbsp;Date(MakeDate(Year(DATE), Month(DATE)), 'MMM YYYY') AS YearMonthDate.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rubenmarin_0-1595184864451.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/37677i11764A7ABEDEEC29/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rubenmarin_0-1595184864451.png" alt="rubenmarin_0-1595184864451.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jul 2020 18:54:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Sum-which-is-the-sum-of-latest-one-Year-Jun-2020-Jul-2019/m-p/1729061#M723202</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2020-07-19T18:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: YTD Sum which is the sum of latest one Year. (Jun-2020-Jul-2019)</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Sum-which-is-the-sum-of-latest-one-Year-Jun-2020-Jul-2019/m-p/1729312#M723203</link>
      <description>&lt;P&gt;Hi Rubenmarin,&lt;/P&gt;&lt;P&gt;The expression with new field created is fantastic.As appeared below, for Ramesh, we considered always from the latest Month (Jun-2020) down to July-2019) as data are available for that period &amp;amp; more. (The figures in the 2nd column carry data for that range). As for the range sum total, it seems to be starting from May-2019 &amp;amp; go up to Jun-2020. Why this cannot be made for the same period (Jul-2019 To Jun-2020) which is the latest ytd 12 Months.(This is my requirement) Your former expression which is in the 2nd column, as I need, looks for the latest twelve Months (Jul-Jun).Can you please see why same range is not chosen for rangesum total as well.is it something wrong in the way I have applied your equation or otherwise?.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your explanations are very easy to follow &amp;amp; apply since matters are made less ambiguous.&lt;/P&gt;&lt;P&gt;Thank you for easy solutions even for matters which looks somewhat tricky.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevilledhamsiri_0-1595264991219.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/37728i243000B7FA14ECA0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="nevilledhamsiri_0-1595264991219.png" alt="nevilledhamsiri_0-1595264991219.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jul 2020 17:37:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Sum-which-is-the-sum-of-latest-one-Year-Jun-2020-Jul-2019/m-p/1729312#M723203</guid>
      <dc:creator>nevilledhamsiri</dc:creator>
      <dc:date>2020-07-20T17:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: YTD Sum which is the sum of latest one Year. (Jun-2020-Jul-2019)</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Sum-which-is-the-sum-of-latest-one-Year-Jun-2020-Jul-2019/m-p/1729394#M723204</link>
      <description>&lt;P&gt;Hi, the last expression was fr rolling 12M, so each row will sum itself and the 11 rows before it.&lt;/P&gt;&lt;P&gt;The first one was to fix the data for only the last 12 months.&lt;/P&gt;&lt;P&gt;A mix of both can be:&lt;/P&gt;&lt;P&gt;RangeSum(Above(TOTAL Sum({&amp;lt;DATE={"&amp;gt;=$(=AddMonths(Max(DATE), -12))"}&amp;gt;} PREMIUM), 0, RangeMin(Rowno(), 11)))&lt;/P&gt;&lt;P&gt;If its not what you are looking for please post a table or an excel with the expected result.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 06:51:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Sum-which-is-the-sum-of-latest-one-Year-Jun-2020-Jul-2019/m-p/1729394#M723204</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2020-07-21T06:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: YTD Sum which is the sum of latest one Year. (Jun-2020-Jul-2019)</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Sum-which-is-the-sum-of-latest-one-Year-Jun-2020-Jul-2019/m-p/1729649#M723205</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi Dear&lt;/P&gt;&lt;P&gt;Issue was resolved. Thank you very much for taking the time in fixing the issue I had. Hope to receive the same kind of solutions that might come in my way.&lt;/P&gt;&lt;P&gt;Neville&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nevilledhamsiri_0-1595354061262.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/37825iC1F7022CD6142E1C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="nevilledhamsiri_0-1595354061262.png" alt="nevilledhamsiri_0-1595354061262.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 18:03:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Sum-which-is-the-sum-of-latest-one-Year-Jun-2020-Jul-2019/m-p/1729649#M723205</guid>
      <dc:creator>nevilledhamsiri</dc:creator>
      <dc:date>2020-07-21T18:03:45Z</dc:date>
    </item>
  </channel>
</rss>

