<?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: Last 12 months or Trailing Twelve Months flag on master calendar in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Last-12-months-or-Trailing-Twelve-Months-flag-on-master-calendar/m-p/350137#M492493</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can create a master calendar how you want. If you dont have flags you can use your dates anyway.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt; Date={'&amp;gt;=$(=AddMonths(Today(),-12)'}&amp;gt;} FieldToSum)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will accumulate the values of FieldToSum for the last 12 months, 14/07/2011 to 14/07/2012 in case of today.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 14 Jul 2012 21:43:11 GMT</pubDate>
    <dc:creator>chematos</dc:creator>
    <dc:date>2012-07-14T21:43:11Z</dc:date>
    <item>
      <title>Last 12 months or Trailing Twelve Months flag on master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/Last-12-months-or-Trailing-Twelve-Months-flag-on-master-calendar/m-p/350136#M492492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does anyone knows how to calculate a sum for the last 12 months of information?&lt;BR /&gt;Is there some flag like the current YTD or Previous YTD flag on the master calendar (InYearToDate(TempDate,$(varToday),0)* -1 as CurYTDFlag)?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks in advance for your input!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2012 12:47:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-12-months-or-Trailing-Twelve-Months-flag-on-master-calendar/m-p/350136#M492492</guid>
      <dc:creator />
      <dc:date>2012-07-13T12:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: Last 12 months or Trailing Twelve Months flag on master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/Last-12-months-or-Trailing-Twelve-Months-flag-on-master-calendar/m-p/350137#M492493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can create a master calendar how you want. If you dont have flags you can use your dates anyway.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt; Date={'&amp;gt;=$(=AddMonths(Today(),-12)'}&amp;gt;} FieldToSum)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will accumulate the values of FieldToSum for the last 12 months, 14/07/2011 to 14/07/2012 in case of today.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Jul 2012 21:43:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-12-months-or-Trailing-Twelve-Months-flag-on-master-calendar/m-p/350137#M492493</guid>
      <dc:creator>chematos</dc:creator>
      <dc:date>2012-07-14T21:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Last 12 months or Trailing Twelve Months flag on master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/Last-12-months-or-Trailing-Twelve-Months-flag-on-master-calendar/m-p/350138#M492494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Muchas gracias Jose Maria!&lt;/P&gt;&lt;P&gt;Your AddMonths formula worked perfectly!&lt;BR /&gt;What I did with it, was to create a flag in the master calendar when a date is on the 12 Months range, so in my set analysis I can only say TTMFlag = 1 (sum({&amp;lt;TTMFlag = {1}&amp;gt;}FieldToSum)&lt;/P&gt;&lt;P&gt;Here's how I created the load script just in case it helps you&lt;BR /&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET varToday = Num(Today());&lt;/P&gt;&lt;P&gt;LET varTTM = Num(AddMonths($(varToday),-12));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(TempDate&amp;gt; $(varTTM),1,0) as TTMFlag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2012 14:39:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-12-months-or-Trailing-Twelve-Months-flag-on-master-calendar/m-p/350138#M492494</guid>
      <dc:creator />
      <dc:date>2012-07-16T14:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: Last 12 months or Trailing Twelve Months flag on master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/Last-12-months-or-Trailing-Twelve-Months-flag-on-master-calendar/m-p/1543811#M492495</link>
      <description>Thank's for your post, that really helped me a lot.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;</description>
      <pubDate>Wed, 13 Feb 2019 16:23:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-12-months-or-Trailing-Twelve-Months-flag-on-master-calendar/m-p/1543811#M492495</guid>
      <dc:creator>utdyt</dc:creator>
      <dc:date>2019-02-13T16:23:27Z</dc:date>
    </item>
  </channel>
</rss>

