<?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: Prior Year Max Month -1 in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Prior-Year-Max-Month-1/m-p/1212827#M876666</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick reply Maximo. But the expression won't work in all cases.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Oct 2016 18:50:10 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-10-24T18:50:10Z</dc:date>
    <item>
      <title>Prior Year Max Month -1</title>
      <link>https://community.qlik.com/t5/QlikView/Prior-Year-Max-Month-1/m-p/1212823#M876662</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 want to get the value of max date of month of prior year -1.&lt;/P&gt;&lt;P&gt;Max Date in my qvw is 10/11/2016. Field name for date is Trans_Date&lt;/P&gt;&lt;P&gt;So, I want to get 9/30/2015&lt;/P&gt;&lt;P&gt;I gave my expression as =Date(monthend(addyears(Max(Trans_Date),-1))) this is returning 10/31/2015. I want to get 9/30/2015.&lt;/P&gt;&lt;P&gt;Any help greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Prior-Year-Max-Month-1/m-p/1212823#M876662</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Prior Year Max Month -1</title>
      <link>https://community.qlik.com/t5/QlikView/Prior-Year-Max-Month-1/m-p/1212824#M876663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try 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;&lt;STRONG&gt;=Date(MonthStart(AddYears(Max(Trans_Date),-1))-1)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2016 18:35:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Prior-Year-Max-Month-1/m-p/1212824#M876663</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-24T18:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: Prior Year Max Month -1</title>
      <link>https://community.qlik.com/t5/QlikView/Prior-Year-Max-Month-1/m-p/1212825#M876664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=MonthEnd(AddMonths(Max(Trans_Date),-13))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2016 18:44:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Prior-Year-Max-Month-1/m-p/1212825#M876664</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2016-10-24T18:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: Prior Year Max Month -1</title>
      <link>https://community.qlik.com/t5/QlikView/Prior-Year-Max-Month-1/m-p/1212826#M876665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick reply Sunny. It works&lt;/P&gt;&lt;P&gt;Just a quick qn, Now how about if I want to get 8/31/2015&lt;/P&gt;&lt;P&gt;Because my expression is KPI(Completed Month)-KPI(&lt;SPAN style="font-size: 13.3333px;"&gt;Completed Month -1) --- Current Year&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;For Prior Year Same expression but for Year -1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;So I have&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;vToDateCompletedMonth = Date(Monthend(Max(Link_Date),-1))&amp;nbsp;&amp;nbsp; (Result - 9/30/2016)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;vToDateCompletedPriorMonth &lt;SPAN style="font-size: 13.3333px;"&gt;= Date(Monthend(Max(Link_Date),-2))&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt; (Result - 8/31/2016)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;vToDateCompleteMonthPriorYear =Date(monthstart(addyears(Max(Link_Date),-1))-1)&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;(Result - 9/30/2015)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;vToDateCompletePriorMonthPriorYear ?&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; (Expected result - 8/31/2015)&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;Hope my question makes sense..&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2016 18:48:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Prior-Year-Max-Month-1/m-p/1212826#M876665</guid>
      <dc:creator />
      <dc:date>2016-10-24T18:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: Prior Year Max Month -1</title>
      <link>https://community.qlik.com/t5/QlikView/Prior-Year-Max-Month-1/m-p/1212827#M876666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick reply Maximo. But the expression won't work in all cases.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2016 18:50:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Prior-Year-Max-Month-1/m-p/1212827#M876666</guid>
      <dc:creator />
      <dc:date>2016-10-24T18:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: Prior Year Max Month -1</title>
      <link>https://community.qlik.com/t5/QlikView/Prior-Year-Max-Month-1/m-p/1212828#M876667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be 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: 13.3333px;"&gt;&lt;STRONG&gt;Date(monthstart(addyears(Max(Link_Date),-1)&lt;SPAN style="color: #ff0000; font-size: 14pt;"&gt;, -1&lt;/SPAN&gt;)-1)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2016 18:59:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Prior-Year-Max-Month-1/m-p/1212828#M876667</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-24T18:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Prior Year Max Month -1</title>
      <link>https://community.qlik.com/t5/QlikView/Prior-Year-Max-Month-1/m-p/1212829#M876668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What cases? I do see &lt;EM&gt;one&lt;/EM&gt; problem, which is that monthend() returns a timestamp rather than a date, but that can be fixed with a daystart(), and I doubt that's what you meant. I ran decades of possible dates through it, and I get the same results for that fixed expression, and Sunny's expression, and this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;monthstart(max(Trans_Date),-12)-1&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2016 19:15:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Prior-Year-Max-Month-1/m-p/1212829#M876668</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-10-24T19:15:41Z</dc:date>
    </item>
  </channel>
</rss>

