<?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: Current Month Vs Previous Month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Current-Month-Vs-Previous-Month/m-p/929034#M321326</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Logically, it looks correct. can you please add data and sample qvw file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Dec 2015 14:10:44 GMT</pubDate>
    <dc:creator>thakkarrahul01</dc:creator>
    <dc:date>2015-12-01T14:10:44Z</dc:date>
    <item>
      <title>Current Month Vs Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Month-Vs-Previous-Month/m-p/929033#M321325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Created 2 variables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vCurrentmonth=month(DateFull)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vPreviousmonth= Month(AddMonths(DateFull,-1))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Trying to build one expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;MonthName={'=$(vCurrentmonth)'}&amp;gt;}Actual) Now the value was coming correctly for the current month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when given previous month variable the value was same as current month:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Sum({&amp;lt;MonthName={'=$(vPreiousmonth)'}&amp;gt;}Actual)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;can please do the needful.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2015 14:00:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Month-Vs-Previous-Month/m-p/929033#M321325</guid>
      <dc:creator>vardhancse</dc:creator>
      <dc:date>2015-12-01T14:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: Current Month Vs Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Month-Vs-Previous-Month/m-p/929034#M321326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Logically, it looks correct. can you please add data and sample qvw file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2015 14:10:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Month-Vs-Previous-Month/m-p/929034#M321326</guid>
      <dc:creator>thakkarrahul01</dc:creator>
      <dc:date>2015-12-01T14:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: Current Month Vs Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Month-Vs-Previous-Month/m-p/929035#M321327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all your second expression is wrong (bad typing), it should be something like 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;=Sum({&amp;lt;MonthName={'=$(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vPreviousmonth&lt;/SPAN&gt;)'}&amp;gt;}Actual) &lt;/SPAN&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;BR /&gt;&lt;/SPAN&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;Then previous month needs to calculate the year, so that when you have for example a current date of 31/01/2015, the previous month should be 12 (December) from the previous year 2014.&lt;/SPAN&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;BR /&gt;&lt;/SPAN&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;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2015 14:45:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Month-Vs-Previous-Month/m-p/929035#M321327</guid>
      <dc:creator>miguelbraga</dc:creator>
      <dc:date>2015-12-01T14:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: Current Month Vs Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Month-Vs-Previous-Month/m-p/929036#M321328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is MonthName function just Month or does it include year information as well? May be be if you can share some data, it would be much more faster and easier to help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2015 14:50:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Month-Vs-Previous-Month/m-p/929036#M321328</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-12-01T14:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Current Month Vs Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Month-Vs-Previous-Month/m-p/929037#M321329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You'll need to add something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vPreviousYearMonth = {$(=Year(addmonths(max(Data),-1)))}&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;vPreviousmonth &lt;/SPAN&gt;= &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Month(AddMonths(DateFull,-1))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({$&amp;lt;Year = &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;{'=$(&lt;SPAN style="font-size: 13.3333px;"&gt;vPreviousYearMonth &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;)'}, MonthName = &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;{'=$(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vPreviousmonth&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;)'}&amp;gt;} Actual)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think, this way you'll get what you want &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2015 14:51:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Month-Vs-Previous-Month/m-p/929037#M321329</guid>
      <dc:creator>miguelbraga</dc:creator>
      <dc:date>2015-12-01T14:51:50Z</dc:date>
    </item>
  </channel>
</rss>

