<?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: Get Current month and previous month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Get-Current-month-and-previous-month/m-p/890744#M1000343</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Try this.&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Current Year = &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Current Month = &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;month&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Previous Year = &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: blue;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: blue;"&gt;addmonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: blue;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: black;"&gt;) ,- 1)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Previous Month = &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;addmonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;) ,- 1))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Jun 2016 09:11:39 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-06-06T09:11:39Z</dc:date>
    <item>
      <title>Get Current month and previous month</title>
      <link>https://community.qlik.com/t5/QlikView/Get-Current-month-and-previous-month/m-p/890736#M1000335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need help...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to calculate current month and previous month. Eg. Suppose all data is selected then values show current month(May) data and previous month(April) data, and if user click on April month filter then variable need to show current month as April and previous month as March. Hope you understand the requirement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Abhijit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 08:17:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-Current-month-and-previous-month/m-p/890736#M1000335</guid>
      <dc:creator>abhijitnalekar</dc:creator>
      <dc:date>2015-06-15T08:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: Get Current month and previous month</title>
      <link>https://community.qlik.com/t5/QlikView/Get-Current-month-and-previous-month/m-p/890737#M1000336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Max(month) respectively Max(month) - 1 will return the current and the prevoius month regarding to the selections.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 10:14:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-Current-month-and-previous-month/m-p/890737#M1000336</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-06-15T10:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: Get Current month and previous month</title>
      <link>https://community.qlik.com/t5/QlikView/Get-Current-month-and-previous-month/m-p/890738#M1000337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use two expression&amp;nbsp; one is for current month and previous month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example:&amp;nbsp; expression for current month: =sum({&amp;lt;Month={"=$(=Max(Month))"}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; expression for previous month: =sum({&amp;lt;Month={"=$(=Max(Month)-1)"}&amp;gt;}Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 10:20:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-Current-month-and-previous-month/m-p/890738#M1000337</guid>
      <dc:creator />
      <dc:date>2015-06-15T10:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: Get Current month and previous month</title>
      <link>https://community.qlik.com/t5/QlikView/Get-Current-month-and-previous-month/m-p/890739#M1000338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;For previous month you can use:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;date={'=MonthsEnd(1,(date),-1)'}, Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 10:30:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-Current-month-and-previous-month/m-p/890739#M1000338</guid>
      <dc:creator>daniel_kusiak</dc:creator>
      <dc:date>2015-06-15T10:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Get Current month and previous month</title>
      <link>https://community.qlik.com/t5/QlikView/Get-Current-month-and-previous-month/m-p/890740#M1000339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can create variables&lt;/P&gt;&lt;P&gt;Curr: vCurrMon&lt;/P&gt;&lt;P&gt;Prev : vPrevMon&lt;/P&gt;&lt;P&gt;vCurrMon = =month(date(Month,'MMM'))&lt;/P&gt;&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;vPrevMon&lt;/SPAN&gt; = date(AddMonths((date(Month,'MMM')),-1,MMM'),'MMM')&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 10:35:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-Current-month-and-previous-month/m-p/890740#M1000339</guid>
      <dc:creator />
      <dc:date>2015-06-15T10:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: Get Current month and previous month</title>
      <link>https://community.qlik.com/t5/QlikView/Get-Current-month-and-previous-month/m-p/890741#M1000340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;previous month formula is not&lt;SPAN style="font-size: 13.3333330154419px;"&gt; working&lt;/SPAN&gt; properly when we select January month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what should i do if i want to show current month when we are showing all data (there is nothing filtered).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abhijit &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 11:31:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-Current-month-and-previous-month/m-p/890741#M1000340</guid>
      <dc:creator>abhijitnalekar</dc:creator>
      <dc:date>2015-06-15T11:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: Get Current month and previous month</title>
      <link>https://community.qlik.com/t5/QlikView/Get-Current-month-and-previous-month/m-p/890742#M1000341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes this is right by turn of the year it won't work (so simply). For this you could use a MonthCounter within the Master-Calendar: &lt;A href="https://community.qlik.com/message/563904"&gt;Re: Howto make a variable to calculate quarters regarding year changes?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another possibility is the use of addmonths() maybe in this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;month(max(Date)) // current month&lt;/P&gt;&lt;P&gt;month(addmonths(max(Date), - 1)) // previous month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 11:51:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-Current-month-and-previous-month/m-p/890742#M1000341</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-06-15T11:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: Get Current month and previous month</title>
      <link>https://community.qlik.com/t5/QlikView/Get-Current-month-and-previous-month/m-p/890743#M1000342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Current month :sum({&amp;lt;Month={"=$(=Max(Month))"}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt; Previous month :sum({$&amp;lt;Month={"=$(=Max(Month)-1)"}&amp;gt;}Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 12:35:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-Current-month-and-previous-month/m-p/890743#M1000342</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-15T12:35:48Z</dc:date>
    </item>
    <item>
      <title>Re: Get Current month and previous month</title>
      <link>https://community.qlik.com/t5/QlikView/Get-Current-month-and-previous-month/m-p/890744#M1000343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Try this.&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Current Year = &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Current Month = &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;month&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Previous Year = &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: blue;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: blue;"&gt;addmonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: blue;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: black;"&gt;) ,- 1)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Previous Month = &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;addmonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;) ,- 1))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2016 09:11:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-Current-month-and-previous-month/m-p/890744#M1000343</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-06T09:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: Get Current month and previous month</title>
      <link>https://community.qlik.com/t5/QlikView/Get-Current-month-and-previous-month/m-p/890745#M1000344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Current_Month={"$(=DATE(FLOOR(MonthStart(max(Date))),'MMM'))"}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Last_Month={"$(=DATE(FLOOR(MonthStart(AddMonths(&lt;SPAN style="font-size: 13.3333px;"&gt;max(Date)&lt;/SPAN&gt;,-1))),'MMM'))"}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2016 10:24:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-Current-month-and-previous-month/m-p/890745#M1000344</guid>
      <dc:creator>Pulkit_Thukral</dc:creator>
      <dc:date>2016-06-06T10:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: Get Current month and previous month</title>
      <link>https://community.qlik.com/t5/QlikView/Get-Current-month-and-previous-month/m-p/890746#M1000345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hi,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The easiest solution to this would be to the monthAgo calculation in the Qlik Calender.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;create an auto calendar for the date field you are trying to visualize by using the Derive fields function in the calendar script. ( I &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; background-color: #f6d5d9;"&gt;can &lt;/SPAN&gt;attach the complete auto calendar script if needed)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ex:-&amp;nbsp; DERIVE FIELDS FROM FIELDS [date Field]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;now, for current month the code in the measure field would be :&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum( {$ &amp;lt; [Date.autoCalendar.MonthsAgo] = {'0'}&amp;gt;} sales) &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;U can change the 0 to 1,2,3 to go back to n last months.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2018 22:55:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-Current-month-and-previous-month/m-p/890746#M1000345</guid>
      <dc:creator>vatsalajmera5</dc:creator>
      <dc:date>2018-01-24T22:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: Get Current month and previous month</title>
      <link>https://community.qlik.com/t5/QlikView/Get-Current-month-and-previous-month/m-p/1566781#M1000346</link>
      <description>&lt;P&gt;This is an old post, but if it helps anyone--consider adding this&amp;nbsp;in your calendar script to identify current month (and year) records and prior month to that current month as 1 or else 0:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF(MONTH(TempDate) = MONTH($(varMaxDate)) and&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Year(TempDate) = Year($(varMaxDate)),1,0) AS CurrentMonthFlag,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp; IF(MONTH(TempDate) = MONTH(ADDMONTHS($(varMaxDate),-1))&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;and if(Month(TempDate)=1,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;if(Year(TempDate)-1= Year($(varMaxDate))-1,1,0),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Year(TempDate)=Year($(varMaxDate)),1 ,0))=1,1,0)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS PriorMonthFlag&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2019 08:39:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-Current-month-and-previous-month/m-p/1566781#M1000346</guid>
      <dc:creator>sandeep_sarawgi</dc:creator>
      <dc:date>2019-04-09T08:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: Get Current month and previous month</title>
      <link>https://community.qlik.com/t5/QlikView/Get-Current-month-and-previous-month/m-p/1910568#M1218112</link>
      <description>&lt;P&gt;Not working in Qlik sense&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 12:21:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-Current-month-and-previous-month/m-p/1910568#M1218112</guid>
      <dc:creator>MMCGLAESASAA</dc:creator>
      <dc:date>2022-03-28T12:21:33Z</dc:date>
    </item>
  </channel>
</rss>

