<?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 adding months in a variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/adding-months-in-a-variable/m-p/51497#M8514</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I have a variable I am using to show current monthminus1 data and it works fine&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=floor(AddMonths(&lt;STRONG&gt;vnp_CurrentMonth&lt;/STRONG&gt;, -1))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the &lt;STRONG&gt;vnp_currentMonth i&lt;/STRONG&gt;s a variable that takes the selected month and is used in the above:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=floor(MonthStart(vSelectedYearMonth))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so the above will show data for the selected month minus one month.&amp;nbsp; I want a variable that will add the current month-1 the current month-2 and the current month-3 so for instance if January is selected it will add the data for Oct, Nov and Dec and display them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The full expression that uses this for your information is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NUM(SUM({&amp;lt;[PA2]={21}, DateNo={'$(vnp_CurrentMonthMinus1)'}, ReferredMM=, YearMonth=&amp;gt;}ActualValue), '#,##0'),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help appreciated&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Mar 2018 15:27:21 GMT</pubDate>
    <dc:creator>rcorcoran</dc:creator>
    <dc:date>2018-03-05T15:27:21Z</dc:date>
    <item>
      <title>adding months in a variable</title>
      <link>https://community.qlik.com/t5/QlikView/adding-months-in-a-variable/m-p/51497#M8514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I have a variable I am using to show current monthminus1 data and it works fine&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=floor(AddMonths(&lt;STRONG&gt;vnp_CurrentMonth&lt;/STRONG&gt;, -1))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the &lt;STRONG&gt;vnp_currentMonth i&lt;/STRONG&gt;s a variable that takes the selected month and is used in the above:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=floor(MonthStart(vSelectedYearMonth))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so the above will show data for the selected month minus one month.&amp;nbsp; I want a variable that will add the current month-1 the current month-2 and the current month-3 so for instance if January is selected it will add the data for Oct, Nov and Dec and display them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The full expression that uses this for your information is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NUM(SUM({&amp;lt;[PA2]={21}, DateNo={'$(vnp_CurrentMonthMinus1)'}, ReferredMM=, YearMonth=&amp;gt;}ActualValue), '#,##0'),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help appreciated&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2018 15:27:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/adding-months-in-a-variable/m-p/51497#M8514</guid>
      <dc:creator>rcorcoran</dc:creator>
      <dc:date>2018-03-05T15:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: adding months in a variable</title>
      <link>https://community.qlik.com/t5/QlikView/adding-months-in-a-variable/m-p/51498#M8515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually sorry I just figured it out straight after posting this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NUM(SUM({&amp;lt;[PA2]={21}, DateNo={'$(vnp_CurrentMonthMinus1)','$(vnp_CurrentMonthMinus2)','$(vnp_CurrentMonthMinus3)'}, ReferredMM=, YearMonth=&amp;gt;}ActualValue), '#,##0'), &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2018 15:33:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/adding-months-in-a-variable/m-p/51498#M8515</guid>
      <dc:creator>rcorcoran</dc:creator>
      <dc:date>2018-03-05T15:33:22Z</dc:date>
    </item>
  </channel>
</rss>

