<?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: Max Month or Current Month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Max-Month-or-Current-Month/m-p/425247#M570216</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sum({&amp;lt;Month={"$(=max(Month)-1)"}&amp;gt;} Value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you need to add a check when Month - 1 goes to previous year.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Sep 2012 08:40:39 GMT</pubDate>
    <dc:creator>giakoum</dc:creator>
    <dc:date>2012-09-20T08:40:39Z</dc:date>
    <item>
      <title>Max Month or Current Month</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Month-or-Current-Month/m-p/425246#M570215</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;Consider the following data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Month&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; Value&lt;/P&gt;&lt;P&gt;201204&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 500&lt;/P&gt;&lt;P&gt;201205&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 750&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;201206&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 850&lt;/P&gt;&lt;P&gt;201207&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 600&lt;/P&gt;&lt;P&gt;201208&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 900&lt;/P&gt;&lt;P&gt;201209&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (blank)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to show, in a text box, the value for max(Month()-1). The textbox should always show the Value 900 (for this specific set of data), even when I choose another Month. Of course when month 201210 is added the 201209 Value will be filled in, and this is at that point the Value that should be shown in the text box. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How should I construct such a formula ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2012 08:28:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Month-or-Current-Month/m-p/425246#M570215</guid>
      <dc:creator />
      <dc:date>2012-09-20T08:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: Max Month or Current Month</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Month-or-Current-Month/m-p/425247#M570216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sum({&amp;lt;Month={"$(=max(Month)-1)"}&amp;gt;} Value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you need to add a check when Month - 1 goes to previous year.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2012 08:40:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Month-or-Current-Month/m-p/425247#M570216</guid>
      <dc:creator>giakoum</dc:creator>
      <dc:date>2012-09-20T08:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: Max Month or Current Month</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Month-or-Current-Month/m-p/425248#M570217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ioannis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the input!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all, how do I check for previous year as you describe?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, when I use your formula it is not showing the Max()-1 result when I do a selection on month, in fact it returns the selected month's result. How can I adjust the formula to only return the Max()-1 month eventhough another month is explicitely selected?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2012 08:48:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Month-or-Current-Month/m-p/425248#M570217</guid>
      <dc:creator />
      <dc:date>2012-09-20T08:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: Max Month or Current Month</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Month-or-Current-Month/m-p/425249#M570218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;=sum({&amp;lt;Month={"$(=max({&amp;lt;Month=&amp;gt;} Month)-1)"}&amp;gt;} Value)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;and a check would be something like :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;if(right(Month,2) - 1 &amp;lt; 52 etc&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2012 08:58:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Month-or-Current-Month/m-p/425249#M570218</guid>
      <dc:creator>giakoum</dc:creator>
      <dc:date>2012-09-20T08:58:49Z</dc:date>
    </item>
    <item>
      <title>Re: Max Month or Current Month</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Month-or-Current-Month/m-p/425250#M570219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Ioannis! This is what I am looking for!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2012 09:10:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Month-or-Current-Month/m-p/425250#M570219</guid>
      <dc:creator />
      <dc:date>2012-09-20T09:10:29Z</dc:date>
    </item>
  </channel>
</rss>

