<?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 Current Month /Previous Month Calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Current-Month-Previous-Month-Calculation/m-p/142951#M22327</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using set Analysis for Currentmonth stock and previous month stock&lt;/P&gt;&lt;P&gt;for current month i am using the expression as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CurrentMonthStock:&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Sum({$&amp;lt;Month={&lt;B&gt;&lt;I&gt;$(=Only(Month))&lt;/I&gt;&lt;/B&gt;}&amp;gt;} LGStockTable.CLOSINGSTOCK))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Previous Month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;(Month)={&lt;B&gt;&lt;I&gt;$(=Only((Month))-1)&lt;/I&gt;&lt;/B&gt;}&amp;gt;} LGStockTable.CLOSINGSTOCK))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get correct value for Currentmonth stock&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But for previous month i get null i.e -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where am i going wrong in previous month calculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to use num function also to convert month in numeric form&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the modified expression i wrote for previous month calculation is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Sum({$&amp;lt;num(Month)={&lt;B&gt;&lt;I&gt;$(=Only((numMonth))-1)&lt;/I&gt;&lt;/B&gt;}&amp;gt;} LGStockTable.CLOSINGSTOCK))&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;But still got null value for previous month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me immediately on this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arvind&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Apr 2009 13:11:02 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-04-30T13:11:02Z</dc:date>
    <item>
      <title>Current Month /Previous Month Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Month-Previous-Month-Calculation/m-p/142951#M22327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using set Analysis for Currentmonth stock and previous month stock&lt;/P&gt;&lt;P&gt;for current month i am using the expression as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CurrentMonthStock:&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Sum({$&amp;lt;Month={&lt;B&gt;&lt;I&gt;$(=Only(Month))&lt;/I&gt;&lt;/B&gt;}&amp;gt;} LGStockTable.CLOSINGSTOCK))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Previous Month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;(Month)={&lt;B&gt;&lt;I&gt;$(=Only((Month))-1)&lt;/I&gt;&lt;/B&gt;}&amp;gt;} LGStockTable.CLOSINGSTOCK))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get correct value for Currentmonth stock&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But for previous month i get null i.e -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where am i going wrong in previous month calculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to use num function also to convert month in numeric form&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the modified expression i wrote for previous month calculation is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Sum({$&amp;lt;num(Month)={&lt;B&gt;&lt;I&gt;$(=Only((numMonth))-1)&lt;/I&gt;&lt;/B&gt;}&amp;gt;} LGStockTable.CLOSINGSTOCK))&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;But still got null value for previous month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me immediately on this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arvind&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2009 13:11:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Month-Previous-Month-Calculation/m-p/142951#M22327</guid>
      <dc:creator />
      <dc:date>2009-04-30T13:11:02Z</dc:date>
    </item>
    <item>
      <title>Current Month /Previous Month Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Month-Previous-Month-Calculation/m-p/142952#M22328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Use the below expression to get the Previous month sales.&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;Month={"$(=date(addmonths(max(Months1),-1),'MMM'))"}&amp;gt;} Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2009 13:48:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Month-Previous-Month-Calculation/m-p/142952#M22328</guid>
      <dc:creator />
      <dc:date>2009-04-30T13:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: Current Month /Previous Month Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Month-Previous-Month-Calculation/m-p/142953#M22329</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; even i am also facing the same issue and i have written the expression as to get the previous month closing inventory qty as current month opening inventory qty but the thing is i am not getting this instead i am getting 0 value &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Current Month :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;CalendarMonthID={$(VCurrentCalendarFiscalMonth)}&amp;gt;}inventoryqty)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Previous Month:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;CalendarMonthID={$(Vcurrentcalendarfiscalmonth-1)}&amp;gt;}inventoryqty)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me on this as this is urgent.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 08:21:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Month-Previous-Month-Calculation/m-p/142953#M22329</guid>
      <dc:creator />
      <dc:date>2012-10-19T08:21:01Z</dc:date>
    </item>
  </channel>
</rss>

