<?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 InMonthsToDate() problems in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/InMonthsToDate-problems/m-p/235497#M86753</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might try something like this.&lt;/P&gt;&lt;P style="font-style: italic"&gt;&lt;/P&gt;&lt;P style="font-style: italic"&gt;&lt;/P&gt;&lt;P style="font-style: italic"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-style: italic"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inmonthtodate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(D, &lt;B&gt;&lt;I&gt;$(vToday)&lt;/I&gt;&lt;/B&gt;, 0) * -1 &lt;B&gt;AS&lt;/B&gt; CMTD, &lt;B&gt;//Current month-to-date&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;inmonthtodate(D, &lt;B&gt;&lt;I&gt;$(vToday)&lt;/I&gt;&lt;/B&gt;, -1) * -1 &lt;B&gt;AS&lt;/B&gt; PMTD, &lt;B&gt;//Previous month-to-date&lt;/B&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;inmonthtodate(D, &lt;B&gt;&lt;I&gt;$(vToday)&lt;/I&gt;&lt;/B&gt;, -12) * -1 &lt;B&gt;AS&lt;/B&gt; FPMTD, &lt;B&gt;//First prior month-to-date, same month last year&lt;/B&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;inmonthtodate(D, &lt;B&gt;&lt;I&gt;$(vToday)&lt;/I&gt;&lt;/B&gt;, -24) * -1 &lt;B&gt;AS&lt;/B&gt; SPMTD &lt;P&gt;&lt;B&gt;//Second prior month-to-date, same month two years ago&lt;/B&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;InMonths&lt;A id="InMonths" name="InMonths"&gt;&lt;/A&gt; ( n, date, basedate , shift [, first_month_of_year = 1] )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Nov 2009 09:25:12 GMT</pubDate>
    <dc:creator>Bill_Britt</dc:creator>
    <dc:date>2009-11-09T09:25:12Z</dc:date>
    <item>
      <title>InMonthsToDate() problems</title>
      <link>https://community.qlik.com/t5/QlikView/InMonthsToDate-problems/m-p/235496#M86752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a temp table that gets autofilled with dates (1/1/2009 - Today())&lt;/P&gt;&lt;P&gt;Iwould like to flag all dates that are within the previous 6 months.&lt;/P&gt;&lt;P&gt;Using InMonthsToDate() yields strange results.&lt;/P&gt;&lt;P&gt;InMonthsToDate(3,myDate, Today(),0) flags dates for the past 2 months&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;InMonthsToDate(4,myDate, Today(),0) flags dates for the past 3 months&lt;/P&gt;&lt;P&gt;I'm not sure why its not going back 3 and 4 months respetively....odd behavior&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similaraly&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;InMonthsToDate(6,myDate, Today(),0) flags dates for the past 5 months (7/1/2009 - 11/8/2009)&lt;/P&gt;&lt;P&gt;I can't put a 7 in the first parameter, it isn't allowed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So how do I flag these dates?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;-Andy&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Nov 2009 09:08:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/InMonthsToDate-problems/m-p/235496#M86752</guid>
      <dc:creator />
      <dc:date>2009-11-09T09:08:44Z</dc:date>
    </item>
    <item>
      <title>InMonthsToDate() problems</title>
      <link>https://community.qlik.com/t5/QlikView/InMonthsToDate-problems/m-p/235497#M86753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might try something like this.&lt;/P&gt;&lt;P style="font-style: italic"&gt;&lt;/P&gt;&lt;P style="font-style: italic"&gt;&lt;/P&gt;&lt;P style="font-style: italic"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-style: italic"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inmonthtodate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(D, &lt;B&gt;&lt;I&gt;$(vToday)&lt;/I&gt;&lt;/B&gt;, 0) * -1 &lt;B&gt;AS&lt;/B&gt; CMTD, &lt;B&gt;//Current month-to-date&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;inmonthtodate(D, &lt;B&gt;&lt;I&gt;$(vToday)&lt;/I&gt;&lt;/B&gt;, -1) * -1 &lt;B&gt;AS&lt;/B&gt; PMTD, &lt;B&gt;//Previous month-to-date&lt;/B&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;inmonthtodate(D, &lt;B&gt;&lt;I&gt;$(vToday)&lt;/I&gt;&lt;/B&gt;, -12) * -1 &lt;B&gt;AS&lt;/B&gt; FPMTD, &lt;B&gt;//First prior month-to-date, same month last year&lt;/B&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;inmonthtodate(D, &lt;B&gt;&lt;I&gt;$(vToday)&lt;/I&gt;&lt;/B&gt;, -24) * -1 &lt;B&gt;AS&lt;/B&gt; SPMTD &lt;P&gt;&lt;B&gt;//Second prior month-to-date, same month two years ago&lt;/B&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;InMonths&lt;A id="InMonths" name="InMonths"&gt;&lt;/A&gt; ( n, date, basedate , shift [, first_month_of_year = 1] )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Nov 2009 09:25:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/InMonthsToDate-problems/m-p/235497#M86753</guid>
      <dc:creator>Bill_Britt</dc:creator>
      <dc:date>2009-11-09T09:25:12Z</dc:date>
    </item>
  </channel>
</rss>

