<?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 max yearmonth fixed not based on selections in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/max-yearmonth-fixed-not-based-on-selections/m-p/236261#M87459</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks both for your reply.&lt;/P&gt;&lt;P&gt;Problem with the peek....is that I try to build in an incremental load. Each month I load the new month seperately. I think this won't work.&lt;/P&gt;&lt;P&gt;Solution of Ivan is only working when I include all Calendar options (bookyear code, number, month, quarter, etc.) in the formule (just like Yearnumber and Yearmonth). So, I did, I think it is working now. But sometimes I get the memory error....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Jan 2011 12:36:06 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-01-10T12:36:06Z</dc:date>
    <item>
      <title>max yearmonth fixed not based on selections</title>
      <link>https://community.qlik.com/t5/QlikView/max-yearmonth-fixed-not-based-on-selections/m-p/236258#M87456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I would like to base my expression on the max yearmonth. Suppose my max yearmonth is 2010 09 in application. Even when I select 2010 05 for example, I would like the expression is based on 2010 09. It is a fixed sheet, I realise that. Is this possible?&lt;/P&gt;&lt;P&gt;My expression at te moment is:&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt; Yearmonth = {$(=max(vYearMonth))},Yearnumber=,Yearmonth=&amp;gt;} Score)&lt;/P&gt;&lt;P&gt;vYearMonth is a variable: =Max(Yearmonth)&lt;/P&gt;&lt;P&gt;So what I would like is this expression not based on selections. How can I change the expression and/or variable so that it is always based on max yearmonth in application?&lt;/P&gt;&lt;P&gt;And...do I need the vYearMonth variable?&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Patricia&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Dec 2010 13:38:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/max-yearmonth-fixed-not-based-on-selections/m-p/236258#M87456</guid>
      <dc:creator />
      <dc:date>2010-12-30T13:38:50Z</dc:date>
    </item>
    <item>
      <title>max yearmonth fixed not based on selections</title>
      <link>https://community.qlik.com/t5/QlikView/max-yearmonth-fixed-not-based-on-selections/m-p/236259#M87457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;At the script level order your table( in which you have your Year and Month) by Year and Month in descending or ascending. Then create a variable&lt;/P&gt;&lt;P&gt;vMax=Peek(YearMonth,0) if descending.&lt;/P&gt;&lt;P&gt;vMax=peek(YearMonth,-1) if ascending.&lt;/P&gt;&lt;P&gt;Use this variable in your expression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Dec 2010 13:48:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/max-yearmonth-fixed-not-based-on-selections/m-p/236259#M87457</guid>
      <dc:creator>syed_muzammil</dc:creator>
      <dc:date>2010-12-30T13:48:33Z</dc:date>
    </item>
    <item>
      <title>max yearmonth fixed not based on selections</title>
      <link>https://community.qlik.com/t5/QlikView/max-yearmonth-fixed-not-based-on-selections/m-p/236260#M87458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Patricia, you actually do not need the variable. You can use a similar expression to the following:&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt; Yearmonth = {$(=max({1} YearMonth))},Yearnumber=,Yearmonth=&amp;gt;} Score)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice the set analysis within the max funtion; that will force QlikView to evaluate the maximum yearmonth through the whole document. Also, make sure to clean all dates indirect selections, so this approach can work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Dec 2010 16:29:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/max-yearmonth-fixed-not-based-on-selections/m-p/236260#M87458</guid>
      <dc:creator />
      <dc:date>2010-12-30T16:29:56Z</dc:date>
    </item>
    <item>
      <title>max yearmonth fixed not based on selections</title>
      <link>https://community.qlik.com/t5/QlikView/max-yearmonth-fixed-not-based-on-selections/m-p/236261#M87459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks both for your reply.&lt;/P&gt;&lt;P&gt;Problem with the peek....is that I try to build in an incremental load. Each month I load the new month seperately. I think this won't work.&lt;/P&gt;&lt;P&gt;Solution of Ivan is only working when I include all Calendar options (bookyear code, number, month, quarter, etc.) in the formule (just like Yearnumber and Yearmonth). So, I did, I think it is working now. But sometimes I get the memory error....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jan 2011 12:36:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/max-yearmonth-fixed-not-based-on-selections/m-p/236261#M87459</guid>
      <dc:creator />
      <dc:date>2011-01-10T12:36:06Z</dc:date>
    </item>
  </channel>
</rss>

