<?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: Flag for Next Month/Year in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Flag-for-Next-Month-Year/m-p/520401#M194481</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just changed your Year condition to have greater than or equal to and added add months&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= if(Month(Addmonths(Today(),1)) = Month(date('01/23/2014','MM/DD/YYYY')) AND Year(Addmonths(Today(),1)) &amp;gt;= Year(date('01/23/2014','MM/DD/YYYY')),1, 0)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Dec 2013 16:40:27 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-12-23T16:40:27Z</dc:date>
    <item>
      <title>Flag for Next Month/Year</title>
      <link>https://community.qlik.com/t5/QlikView/Flag-for-Next-Month-Year/m-p/520399#M194479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a script line that will return a 1 or a 0 based on the date falling in the next month. The problem I have is when it gets to December, where the script below will return the year 2013 for todays date, not 2014.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can see why it does it but I was wondering how I could get around it - I was thinking of putting in an IF statement (where if the month is 12 then +1 to the year) - but is there a smarter way of doing it? Thanks for any help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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;Today&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(),1)) =&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: #800000; font-size: 8pt;"&gt;[Promised Payment Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Today&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;())= &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Promised Payment Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), 1, 0) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2013 10:05:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Flag-for-Next-Month-Year/m-p/520399#M194479</guid>
      <dc:creator>stuwannop</dc:creator>
      <dc:date>2013-12-23T10:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: Flag for Next Month/Year</title>
      <link>https://community.qlik.com/t5/QlikView/Flag-for-Next-Month-Year/m-p/520400#M194480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if(InMonth([Promised Payment Date], today(), 1), 1, 0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This says if [Promised Payment Date] is in the month after today (denoted by the 1).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2013 15:46:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Flag-for-Next-Month-Year/m-p/520400#M194480</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2013-12-23T15:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Flag for Next Month/Year</title>
      <link>https://community.qlik.com/t5/QlikView/Flag-for-Next-Month-Year/m-p/520401#M194481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just changed your Year condition to have greater than or equal to and added add months&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= if(Month(Addmonths(Today(),1)) = Month(date('01/23/2014','MM/DD/YYYY')) AND Year(Addmonths(Today(),1)) &amp;gt;= Year(date('01/23/2014','MM/DD/YYYY')),1, 0)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2013 16:40:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Flag-for-Next-Month-Year/m-p/520401#M194481</guid>
      <dc:creator />
      <dc:date>2013-12-23T16:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Flag for Next Month/Year</title>
      <link>https://community.qlik.com/t5/QlikView/Flag-for-Next-Month-Year/m-p/520402#M194482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;=If (fabs(Month([Promised Payment Date]) - Month(Today())) =1, 1,0)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2013 19:38:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Flag-for-Next-Month-Year/m-p/520402#M194482</guid>
      <dc:creator>iktrayanov</dc:creator>
      <dc:date>2013-12-23T19:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Flag for Next Month/Year</title>
      <link>https://community.qlik.com/t5/QlikView/Flag-for-Next-Month-Year/m-p/520403#M194483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please try with MonthStart or InMonth functions like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method 1: MonthStart&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Let vDateCheck =&amp;nbsp; Num(MonthStart(AddMonths(Today(),1))) ; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF(MonthStart([Promised Payment Date]) = $(vDateCheck) , 1, 0) AS NextMonthYr_Flag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method 2: InMonth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF(InMonth([Promised Payment Date], Today() , 1) , 1, 0) AS NextMonthYr_Flag&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2013 19:57:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Flag-for-Next-Month-Year/m-p/520403#M194483</guid>
      <dc:creator />
      <dc:date>2013-12-23T19:57:58Z</dc:date>
    </item>
  </channel>
</rss>

