<?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: Previous Month Function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Previous-Month-Function/m-p/593474#M1111410</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the script create this field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;dual([YEAR] &amp;amp; '-' &amp;amp; [MONTHNAME],Date(MonthStart([Date])))&amp;nbsp; as [Year-Month];&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(Date) as YEAR,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(Date) as MONTHNAME,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; etc,&lt;/P&gt;&lt;P&gt;FROM .....;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now use Year-Month in your calculation.&amp;nbsp; When you subtract by 1 it will revert to the prior year at January.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Mar 2014 17:47:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-03-03T17:47:50Z</dc:date>
    <item>
      <title>Previous Month Function</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Month-Function/m-p/593472#M1111408</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;I have a selection date which contain YEAR, MONTHNAME, QUARTER and DAY of my INVOICE_DATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I want to show, in a table, the value for &lt;STRONG&gt;max(Monthname()-1)&lt;/STRONG&gt;. The textbox should always show the Value of &lt;STRONG&gt;Sum&lt;/STRONG&gt;(&lt;STRONG&gt;sales)&lt;/STRONG&gt; for the &lt;STRONG&gt;Current Month &lt;/STRONG&gt;and&lt;STRONG&gt; the previous one. &lt;/STRONG&gt;&lt;SPAN style="color: #ff0000; text-decoration: underline;"&gt;&lt;SPAN style="color: #000080; text-decoration: underline;"&gt;(MONTHNAME-1)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The formula is:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Sum(AMTATI_0*SNS_0 ) &lt;/STRONG&gt;that show me the sum of the MOnth selected for the same year, and when I select Januarry 2013, I want to display that month &lt;STRONG&gt;and&lt;/STRONG&gt; Decembre 2012.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;How can I display the sum of the previous MONTH?? &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;How should I construct such a formula ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Thanks&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;IMG alt="Sans titre.png" class="jive-image" src="/legacyfs/online/54180_Sans titre.png" style="width: 620px; height: 149px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 17:23:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Month-Function/m-p/593472#M1111408</guid>
      <dc:creator />
      <dc:date>2014-03-03T17:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Month Function</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Month-Function/m-p/593473#M1111409</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;I think you will need to add 2 fields:&lt;/P&gt;&lt;P&gt;1) YearMonth field, where 1 is the first month of the first year of the db, and you increment by one every month&lt;/P&gt;&lt;P&gt;So that -1 will go back to previous month, whatever the month and year, especially January&lt;/P&gt;&lt;P&gt;2) Sales: in the load compute AMTATI_0*SNS_0 as Sales so that you just do Sum(Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May I recommend you to read the doc on set analysis: &lt;A href="http://community.qlik.com/docs/DOC-4951"&gt;http://community.qlik.com/docs/DOC-4951&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I think your solution is in chapter 4.6.1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fabrice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 17:37:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Month-Function/m-p/593473#M1111409</guid>
      <dc:creator />
      <dc:date>2014-03-03T17:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Month Function</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Month-Function/m-p/593474#M1111410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the script create this field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;dual([YEAR] &amp;amp; '-' &amp;amp; [MONTHNAME],Date(MonthStart([Date])))&amp;nbsp; as [Year-Month];&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(Date) as YEAR,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(Date) as MONTHNAME,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; etc,&lt;/P&gt;&lt;P&gt;FROM .....;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now use Year-Month in your calculation.&amp;nbsp; When you subtract by 1 it will revert to the prior year at January.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 17:47:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Month-Function/m-p/593474#M1111410</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-03T17:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Month Function</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Month-Function/m-p/593475#M1111411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI JB &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Del calendario imagino que tienes un campo Fecha DD-MM-YYYY.&lt;/P&gt;&lt;P&gt;Si este es el caso puedes utilizar la función &lt;SPAN style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt;"&gt;AddMonths. El cual a la fecha le puedes agregar o quitar&amp;nbsp; meses.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt;"&gt;Para este caso, si tu campo mes se llama Mes y año se llama Año el ejemplo es:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt;"&gt;Formula mes actual&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN lang="EN-US" style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-ansi-language: EN-US;"&gt;Sum ( {&amp;lt;Yeay={$(=Year&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-ansi-language: EN-US;"&gt;(max(DATE)))},Month={$(=Month(max(DATE))}&amp;gt;} AMTATI_0 * SNS_0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN lang="EN-US" style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-ansi-language: EN-US;"&gt;Formula mes anterior&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-ansi-language: EN-US;"&gt;Sum ( {&amp;lt;Yeay={$(=Year&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-ansi-language: EN-US;"&gt;(AddMonths (max(DATE),-1)))},Month={$(=Month(AddMonths (max(DATE),-1))}&amp;gt;} AMTATI_0&lt;BR /&gt;* SNS_0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt;"&gt;Esto es de manera dinámica si no tienes selección de periodo lo que te da como resultado es sobre el mes y año máximo, si seleccionan un mes o año anterior en ese momento ese mes o año se convierten en el mes y año máximo&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt;"&gt;-------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN lang="EN-US" style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-ansi-language: EN-US;"&gt;in your calendar guess you have a DD-MM-YYYY Date field. &lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-ansi-language: EN-US;"&gt;If this is the case you can use the function AddMonths. this funtion you can add or remove months. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-ansi-language: EN-US;"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-ansi-language: EN-US;"&gt;In this case, for example if you field is called Month and Year &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-ansi-language: EN-US;"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-ansi-language: EN-US;"&gt;the example is: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN lang="EN-US" style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-ansi-language: EN-US;"&gt;Current Month Formula &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN lang="EN-US" style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-ansi-language: EN-US;"&gt;Sum ( {&amp;lt;Yeay={$(=Year&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-ansi-language: EN-US;"&gt;(max(DATE)))},Month={$(=Month(max(DATE))}&amp;gt;} AMTATI_0 * SNS_0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-ansi-language: EN-US;"&gt;Formula previous month &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN lang="EN-US" style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-ansi-language: EN-US;"&gt;Sum ( {&amp;lt;Yeay={$(=Year&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-ansi-language: EN-US;"&gt;(AddMonths (max(DATE),-1)))},Month={$(=Month(AddMonths (max(DATE),-1))}&amp;gt;} AMTATI_0&lt;BR /&gt;* SNS_0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN lang="EN-US" style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-ansi-language: EN-US;"&gt;This is dynamically if you have selected period giving you result is maximum on the month and year, if they select a month or last year at this time that month or year become the highest month and year&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 18:04:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Month-Function/m-p/593475#M1111411</guid>
      <dc:creator>montero91</dc:creator>
      <dc:date>2014-03-03T18:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Month Function</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Month-Function/m-p/593476#M1111413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have a look at attached QVW and screen&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Cureent Month Vs Previous.jpg" class="jive-image" src="/legacyfs/online/54177_Cureent Month Vs Previous.jpg" style="width: 620px; height: 178px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 18:18:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Month-Function/m-p/593476#M1111413</guid>
      <dc:creator>chiru_thota</dc:creator>
      <dc:date>2014-03-03T18:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Month Function</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Month-Function/m-p/593477#M1111417</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;this can be done with Set Analysis and AddMonths(). If you would upload a sample with the fields you have one can build a solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 18:45:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Month-Function/m-p/593477#M1111417</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2014-03-03T18:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Previous Month Function</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Month-Function/m-p/593478#M1111419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ralf,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I Can't Upload the project , but I can describe what I have in exprssions and Date Fields loaded:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;UNQUALIFY *;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; text-decoration: underline;"&gt;MASTER_DATE:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;LOAD SINVOICEV.INVDAT_0,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;Date(SINVOICEV.INVDAT_0) as SINVOICEV.INVDAT_Date,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&amp;nbsp; Day(SINVOICEV.INVDAT_0) as DAYNUMBER,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Week (SINVOICEV.INVDAT_0) AS WEEK,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; Month(SINVOICEV.INVDAT_0) AS MONTHNAME,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Num (Month(SINVOICEV.INVDAT_0)) AS MONTHNUMBER,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; num(RowNo()) as MONTHNO,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Trimestre' &amp;amp; CEIL (Num (month(SINVOICEV.INVDAT_0))/3) as QUARTER,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Semestre'&amp;amp; CEIL (Num (month(SINVOICEV.INVDAT_0))/6) as SEMESTRE,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; YEAR (SINVOICEV.INVDAT_0) As YEAR&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resident &lt;SPAN style="text-decoration: underline;"&gt;SINVOICEV&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;UNQUALIFY *;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;CalendarTemp:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;Max(SINVOICEV.INVDAT_0) AS DateMax,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;Min(SINVOICEV.INVDAT_0) AS DateMin&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;Resident &lt;SPAN style="text-decoration: underline;"&gt;MASTER_DATE&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the Date Table , for the function , Itried that one and it doesnt works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&lt;STRONG&gt;=sum( {&amp;lt;Year={$(=Year(AddMonths (max(SINVOICEV.INVDAT_Date),-1)))},MONTHNAME={$(=MONTH(AddMonths (max(SINVOICEV.INVDAT_Date),-1)))}&amp;gt;} Sales)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to display Sales for the month select and the previous one . &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2014 10:29:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Month-Function/m-p/593478#M1111419</guid>
      <dc:creator />
      <dc:date>2014-03-04T10:29:40Z</dc:date>
    </item>
  </channel>
</rss>

