<?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 Previous 12 months expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Previous-12-months-expression/m-p/1371330#M833861</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the following expression to calculate between two dates&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Date ={"&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)"}&amp;gt;} Price)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also want to calculate the same period for the previous 12 months&lt;/P&gt;&lt;P&gt;I have tried the following expressions but cannot get them to work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum({&amp;lt;Date={"=Date&amp;gt;=addmonths(vStartDate,-12) and Date&amp;lt;=addmonths(vEndDate,-12)"}&amp;gt;} Price)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum({$&amp;lt;Date ={"&amp;gt;=$(=Num(AddMonths(vStartDate, -12)))&amp;lt;=$(=Num(AddMonths(vEndDate, -12)))"}&amp;gt;}Price)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody advise?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>yvonne-c</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Previous 12 months expression</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-12-months-expression/m-p/1371330#M833861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the following expression to calculate between two dates&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Date ={"&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)"}&amp;gt;} Price)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also want to calculate the same period for the previous 12 months&lt;/P&gt;&lt;P&gt;I have tried the following expressions but cannot get them to work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum({&amp;lt;Date={"=Date&amp;gt;=addmonths(vStartDate,-12) and Date&amp;lt;=addmonths(vEndDate,-12)"}&amp;gt;} Price)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum({$&amp;lt;Date ={"&amp;gt;=$(=Num(AddMonths(vStartDate, -12)))&amp;lt;=$(=Num(AddMonths(vEndDate, -12)))"}&amp;gt;}Price)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody advise?&lt;/P&gt;&lt;P&gt;Thanks&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/Previous-12-months-expression/m-p/1371330#M833861</guid>
      <dc:creator>yvonne-c</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Previous 12 months expression</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-12-months-expression/m-p/1371331#M833862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the format of your date field? Also, are you making selection in Date or another date and time related fields?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 16:07:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-12-months-expression/m-p/1371331#M833862</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-06-14T16:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Previous 12 months expression</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-12-months-expression/m-p/1371332#M833863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Sum({&amp;lt;Date={"=Only({1} Date) &amp;gt;= AddMonths(vStartDate, -12) and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Only({1} Date) &lt;/SPAN&gt;&amp;lt;= &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;AddMonths&lt;/SPAN&gt;(vEndDate, -12)"}&amp;gt;} Price)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 16:08:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-12-months-expression/m-p/1371332#M833863</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-06-14T16:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: Previous 12 months expression</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-12-months-expression/m-p/1371333#M833864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny&lt;/P&gt;&lt;P&gt;This one seems to be working &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jun 2017 07:14:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-12-months-expression/m-p/1371333#M833864</guid>
      <dc:creator>yvonne-c</dc:creator>
      <dc:date>2017-06-15T07:14:39Z</dc:date>
    </item>
  </channel>
</rss>

