<?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: Return number for Month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Return-number-for-Month/m-p/925433#M955349</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;num or rangemax&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vM=rangemax(Month(addmonths(peek('MaxDate', $(m)-1, 'MaxMonth'),1))); &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Nov 2015 17:45:40 GMT</pubDate>
    <dc:creator>maxgro</dc:creator>
    <dc:date>2015-11-17T17:45:40Z</dc:date>
    <item>
      <title>Return number for Month</title>
      <link>https://community.qlik.com/t5/QlikView/Return-number-for-Month/m-p/925431#M955347</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 script doesn't work, (MaxDate = 30 Aug 2015):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;let&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vMN&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;addmonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('MaxDate', &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(m)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;-1, 'MaxMonth'),1))); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I need vMN to = '9' for September...and it's not returning anything at all.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;let&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vM&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;addmonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('MaxDate', &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(m)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;-1, 'MaxMonth'),1));&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;this script returns Sep, so why doesn't the above script work?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Nov 2015 17:33:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-number-for-Month/m-p/925431#M955347</guid>
      <dc:creator>stjernvd</dc:creator>
      <dc:date>2015-11-17T17:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: Return number for Month</title>
      <link>https://community.qlik.com/t5/QlikView/Return-number-for-Month/m-p/925432#M955348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="text-decoration: line-through;"&gt;How are you creating MaxDate??&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&lt;STRONG&gt;Max(Date) as MaxDate??&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&lt;STRONG&gt;If that is true, try this may be:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: line-through;"&gt;LET vMN = Num(Month(AddMonths(Peek('MaxDate'), 1)));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;&lt;STRONG style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;LET vMN = &lt;SPAN style="color: #ff0000;"&gt;Num&lt;/SPAN&gt;(Month(addmonths(peek('MaxDate', $(m)&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;STRONG&gt;-1, 'MaxMonth'),1)));&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Nov 2015 17:36:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-number-for-Month/m-p/925432#M955348</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-11-17T17:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Return number for Month</title>
      <link>https://community.qlik.com/t5/QlikView/Return-number-for-Month/m-p/925433#M955349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;num or rangemax&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vM=rangemax(Month(addmonths(peek('MaxDate', $(m)-1, 'MaxMonth'),1))); &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Nov 2015 17:45:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-number-for-Month/m-p/925433#M955349</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-11-17T17:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: Return number for Month</title>
      <link>https://community.qlik.com/t5/QlikView/Return-number-for-Month/m-p/925434#M955350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There´s no sense to use Max() in this case, because you have only one value returned by Peek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Nov 2015 17:46:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-number-for-Month/m-p/925434#M955350</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2015-11-17T17:46:15Z</dc:date>
    </item>
  </channel>
</rss>

