<?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: Rolling back 12 months in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Rolling-back-12-months/m-p/1174035#M906871</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following might help and extend your applications capability:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-16887"&gt;Subroutine to Create Data Model for From/To Date Selection&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good Luck! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/check.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Jun 2016 08:49:28 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-06-23T08:49:28Z</dc:date>
    <item>
      <title>Rolling back 12 months</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-back-12-months/m-p/1174032#M906868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to write an expression in order to present aggregated data for 12 months back from my current (max reporting month) The format that is used in the application is 201604 (for April for example). So if I try 201604 - 12 I get 201592 instead of 201505. Do you have any idea what is the correct way to create this expression so that it calculates correctly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mihael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-back-12-months/m-p/1174032#M906868</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling back 12 months</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-back-12-months/m-p/1174033#M906869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mihael, try like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yourDate - 100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That should work for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Andrés&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jun 2016 16:14:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-back-12-months/m-p/1174033#M906869</guid>
      <dc:creator>andrespa</dc:creator>
      <dc:date>2016-06-22T16:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling back 12 months</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-back-12-months/m-p/1174034#M906870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Turn those numbers into real dates in the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...fields...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Date#( [reporting month], 'YYYYMM'),'YYYYMM') as [reporting month]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...more fields....&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...some source...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can treat that field &lt;SPAN style="font-size: 13.3333px;"&gt;[reporting month] as a date:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;[reporting month]={'&amp;gt;$(=Date(AddMonths(max([reporting month]),-12),'YYYYMM'))&amp;lt;=&lt;SPAN style="font-size: 13.3333px;"&gt;(=Date(max([reporting month]),'YYYYMM'))&lt;/SPAN&gt;'}&amp;gt;}Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can make it even easier if you create a numeric field:&lt;/P&gt;&lt;P&gt;Year(&lt;SPAN style="font-size: 13.3333px;"&gt;Date#( [reporting month], 'YYYYMM'))*12+Month(&lt;SPAN style="font-size: 13.3333px;"&gt;Date#( [reporting month], 'YYYYMM')) as monthserial&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The set analysis expression would then be:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;monthserial={'&amp;gt;&lt;SPAN style="font-size: 13.3333px;"&gt;$(=max(monthserial)-12)&lt;/SPAN&gt;&amp;lt;=$(=max(monthserial))'}&amp;gt;}Amount)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jun 2016 16:15:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-back-12-months/m-p/1174034#M906870</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-06-22T16:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling back 12 months</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-back-12-months/m-p/1174035#M906871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following might help and extend your applications capability:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-16887"&gt;Subroutine to Create Data Model for From/To Date Selection&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good Luck! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/check.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2016 08:49:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-back-12-months/m-p/1174035#M906871</guid>
      <dc:creator />
      <dc:date>2016-06-23T08:49:28Z</dc:date>
    </item>
  </channel>
</rss>

