<?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: Calendar Dates Script - Next Month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calendar-Dates-Script-Next-Month/m-p/607020#M224137</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't Exactly understood what you want...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is like you want to find last date for any date&lt;/P&gt;&lt;P&gt;add below in script...&lt;/P&gt;&lt;P&gt;MonthEnd(&lt;SPAN style="color: #800000; font-family: 'Courier New'; font-size: 12px;"&gt;QualifiedDate&lt;/SPAN&gt;) as MonthEndQualifiedDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if your want last end date for next month&lt;/P&gt;&lt;P&gt;=MonthEnd(AddMonths(&lt;SPAN style="color: #800000; font-family: 'Courier New'; font-size: 12px;"&gt;QualifiedDate&lt;/SPAN&gt;,1)) as MonthEndQualifiedDateNextMonth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Mar 2014 11:54:36 GMT</pubDate>
    <dc:creator>MK_QSL</dc:creator>
    <dc:date>2014-03-21T11:54:36Z</dc:date>
    <item>
      <title>Calendar Dates Script - Next Month</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Dates-Script-Next-Month/m-p/607018#M224135</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 currently have a line in my script that allows me to9 flag all dates last calendar month. This is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;IF(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;SPAN&gt;InMonthToDate&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;QualifiedDate&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;today&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(), -1),1,0) where qualifiedDate is of course my date value. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I want to be able to write a line that will flag all dates in the NEXT calendar month (bear in mind if it's December 2014 it needs to go to January 2015). Can someone help me out? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks in advance&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Stu&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Mar 2014 11:43:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Dates-Script-Next-Month/m-p/607018#M224135</guid>
      <dc:creator>stuwannop</dc:creator>
      <dc:date>2014-03-21T11:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar Dates Script - Next Month</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Dates-Script-Next-Month/m-p/607019#M224136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'd do it this way:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;-(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;addmonths&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;monthstart&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;QualifiedDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;),-1)=&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;monthstart&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Today&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;()))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Hope this helps&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Mar 2014 11:48:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Dates-Script-Next-Month/m-p/607019#M224136</guid>
      <dc:creator />
      <dc:date>2014-03-21T11:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar Dates Script - Next Month</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Dates-Script-Next-Month/m-p/607020#M224137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't Exactly understood what you want...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is like you want to find last date for any date&lt;/P&gt;&lt;P&gt;add below in script...&lt;/P&gt;&lt;P&gt;MonthEnd(&lt;SPAN style="color: #800000; font-family: 'Courier New'; font-size: 12px;"&gt;QualifiedDate&lt;/SPAN&gt;) as MonthEndQualifiedDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if your want last end date for next month&lt;/P&gt;&lt;P&gt;=MonthEnd(AddMonths(&lt;SPAN style="color: #800000; font-family: 'Courier New'; font-size: 12px;"&gt;QualifiedDate&lt;/SPAN&gt;,1)) as MonthEndQualifiedDateNextMonth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Mar 2014 11:54:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Dates-Script-Next-Month/m-p/607020#M224137</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-03-21T11:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Calendar Dates Script - Next Month</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Dates-Script-Next-Month/m-p/607021#M224138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pierre&lt;/P&gt;&lt;P&gt;Thanks for the quick response, that seems to return a 0 if put in an IF statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried playing around with the operators (which I think it must be to do with) but I haven't quite cracked it. I ended up with&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(-(&lt;SPAN style="color: #0000ff;"&gt;addmonths&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;monthstart&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;QualifiedDate&lt;/SPAN&gt;),1)=&lt;SPAN style="color: #0000ff;"&gt;monthstart&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Today&lt;/SPAN&gt;())),1,0) but that returns last month so I'm still trying.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Manesh - I don't want to ultimately return a date as such, I want to return a 1 or 0 depending on whether the given date (Qualified Date) falls in the next calendar month or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Stu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Mar 2014 12:22:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Dates-Script-Next-Month/m-p/607021#M224138</guid>
      <dc:creator>stuwannop</dc:creator>
      <dc:date>2014-03-21T12:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar Dates Script - Next Month</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Dates-Script-Next-Month/m-p/607022#M224139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's a boolean formula, can be put in the script without an IF.&lt;/P&gt;&lt;P&gt;With an if, this should work:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;if(addmonths(monthstart(QualifiedDate),-1)=monthstart(Today()),1,0)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Mar 2014 12:25:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Dates-Script-Next-Month/m-p/607022#M224139</guid>
      <dc:creator />
      <dc:date>2014-03-21T12:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar Dates Script - Next Month</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Dates-Script-Next-Month/m-p/607023#M224140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi Pierre - Scratch my last response it actually works. User error I'm afraid - I've found a glitch in my data load. The script wasn't loading anything past todays date so of course it only returned a 0 flag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the answer and sorry to take up more of your time - appreciate your patience.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Mar 2014 14:12:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Dates-Script-Next-Month/m-p/607023#M224140</guid>
      <dc:creator>stuwannop</dc:creator>
      <dc:date>2014-03-21T14:12:38Z</dc:date>
    </item>
  </channel>
</rss>

