<?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: SELECT THE LAST MONTH AND YEAR in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SELECT-THE-LAST-MONTH-AND-YEAR/m-p/325586#M119892</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you again &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;. It works!!!&lt;/P&gt;&lt;P&gt; The format is underline 'MMM YYYY'. Do you know why?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Nov 2011 21:54:09 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-11-16T21:54:09Z</dc:date>
    <item>
      <title>SELECT THE LAST MONTH AND YEAR</title>
      <link>https://community.qlik.com/t5/QlikView/SELECT-THE-LAST-MONTH-AND-YEAR/m-p/325584#M119890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN id="result_box" lang="en"&gt;&lt;SPAN class="hps"&gt;How do I get&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;data&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;only&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;for the last month in expression?&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt; &lt;SPAN class="hps"&gt;My&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;variable&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;month and year&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;is a string.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN class="hps"&gt;I want to get something like that:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN class="hps"&gt;count( &lt;STRONG&gt;CONDITION SELECTED THE LAST MONTH AND YEAR , &lt;/STRONG&gt;Value)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN class="hps"&gt;Thank in advance,&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 21:07:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SELECT-THE-LAST-MONTH-AND-YEAR/m-p/325584#M119890</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-11-16T21:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT THE LAST MONTH AND YEAR</title>
      <link>https://community.qlik.com/t5/QlikView/SELECT-THE-LAST-MONTH-AND-YEAR/m-p/325585#M119891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure what you mean by "My variable month and year is a string."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would normally have my Month field defined like 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;date(monthstart(Date),'MMM YYYY') as Month&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In that case, probably 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;count({&amp;lt;Month={'$(=date(max(Month),'MMM YYYY'))'}&amp;gt;} Value)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 21:30:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SELECT-THE-LAST-MONTH-AND-YEAR/m-p/325585#M119891</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-11-16T21:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT THE LAST MONTH AND YEAR</title>
      <link>https://community.qlik.com/t5/QlikView/SELECT-THE-LAST-MONTH-AND-YEAR/m-p/325586#M119892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you again &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;. It works!!!&lt;/P&gt;&lt;P&gt; The format is underline 'MMM YYYY'. Do you know why?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 21:54:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SELECT-THE-LAST-MONTH-AND-YEAR/m-p/325586#M119892</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-11-16T21:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT THE LAST MONTH AND YEAR</title>
      <link>https://community.qlik.com/t5/QlikView/SELECT-THE-LAST-MONTH-AND-YEAR/m-p/325587#M119893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So in the expression editor, it's underlining the 'MMM YYYY' as bad, but the expression works anyway?&amp;nbsp; If so, my guess is that the editor is getting confused by the use of single quotes, and it thinks that '$(=date(max(Month),' is a quoted string, and that '))' is a quoted string.&amp;nbsp; With that interpretation, MMM YYYY is just sitting in the middle of the expression where it thinks a comma belongs instead.&amp;nbsp; So it highlights it.&amp;nbsp; It's wrong about it being an error, but I can understand how it got confused.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When QlikView processes this, it will process the $(...) part before even looking at anything else.&amp;nbsp; At that point, the inner single quotes will be removed, and instead we'll have something like JAN 2011.&amp;nbsp; The single quotes around it will then work normally.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 22:01:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SELECT-THE-LAST-MONTH-AND-YEAR/m-p/325587#M119893</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-11-16T22:01:17Z</dc:date>
    </item>
  </channel>
</rss>

