<?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 How can I do this selection? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-can-I-do-this-selection/m-p/147390#M25822</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm guessing this should work:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;ActiveDocument.GetField("Month").Select ActiveDocument.Evaluate("date(addmonths(monthstart(today(1)),-1),'M')")&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I did a quick test and 05 is different from 5. If I use your original expression, I can select months stored as 05. If I remove one of the Ms, it won't select 05, but it will select 5. I'd check how you're early months look, I'm guessing they don't have the leading zero.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Jun 2009 21:53:43 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-06-22T21:53:43Z</dc:date>
    <item>
      <title>How can I do this selection?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-do-this-selection/m-p/147389#M25821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a macro used to select actual month and year in my application:&lt;/P&gt;&lt;P&gt;ActiveDocument.GetField("Month").Select ActiveDocument.Evaluate("date(addmonths(monthstart(today(1)),-1),'MM')")&lt;/P&gt;&lt;P&gt;It was working, till I defined my Month field properties to integer.&lt;/P&gt;&lt;P&gt;Can anyone help me fixing this function?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2009 20:48:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-do-this-selection/m-p/147389#M25821</guid>
      <dc:creator>rcandeo</dc:creator>
      <dc:date>2009-06-22T20:48:42Z</dc:date>
    </item>
    <item>
      <title>How can I do this selection?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-do-this-selection/m-p/147390#M25822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm guessing this should work:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;ActiveDocument.GetField("Month").Select ActiveDocument.Evaluate("date(addmonths(monthstart(today(1)),-1),'M')")&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I did a quick test and 05 is different from 5. If I use your original expression, I can select months stored as 05. If I remove one of the Ms, it won't select 05, but it will select 5. I'd check how you're early months look, I'm guessing they don't have the leading zero.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2009 21:53:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-do-this-selection/m-p/147390#M25822</guid>
      <dc:creator />
      <dc:date>2009-06-22T21:53:43Z</dc:date>
    </item>
    <item>
      <title>How can I do this selection?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-do-this-selection/m-p/147391#M25823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It worked, but I am worried about last three years of the month: 10, 11, 12. Do You Think will it work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2009 23:10:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-do-this-selection/m-p/147391#M25823</guid>
      <dc:creator>rcandeo</dc:creator>
      <dc:date>2009-06-22T23:10:50Z</dc:date>
    </item>
    <item>
      <title>How can I do this selection?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-do-this-selection/m-p/147392#M25824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, those would have worked with either expression. One M means one number for the earlier months, but would still display as two numbers for October and later.&lt;/P&gt;&lt;P&gt;You could probably amend your expression to select a later month, by changing the parameter of the addmonths function to test it out. EDIT: I did addmonths(date, 5) for both MM and M and it selected 11.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2009 23:20:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-do-this-selection/m-p/147392#M25824</guid>
      <dc:creator />
      <dc:date>2009-06-22T23:20:38Z</dc:date>
    </item>
    <item>
      <title>How can I do this selection?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-do-this-selection/m-p/147393#M25825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Forget, I've found a way to test and it worked again. Thank You&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2009 23:21:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-do-this-selection/m-p/147393#M25825</guid>
      <dc:creator>rcandeo</dc:creator>
      <dc:date>2009-06-22T23:21:12Z</dc:date>
    </item>
  </channel>
</rss>

