<?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: Date/month calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-month-calculation/m-p/75662#M782218</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Modified the script to see the other two options&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;T1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Len(Trim(Previous_Date)) = 0, 'New',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(AddYears(Previous_Date, 1) &amp;gt;= Current_Date, '1-12 month',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(AddYears(Previous_Date, 3) &amp;gt;= Current_Date, '13-36 month',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(AddYears(Previous_Date, 5) &amp;gt;= Current_Date, '37-60 month')))) as Status;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * INLINE [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID, Current_Date, Previous_Date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, 03/22/2018, 02/27/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2, 03/22/2018, 02/28/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3, 03/22/2018, 02/27/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4, 03/22/2018, 03/03/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5, 03/22/2018, 03/03/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6, 03/22/2018, 03/07/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7, 03/22/2018, 03/01/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8, 03/22/2018, 04/28/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9, 03/22/2018, 03/22/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10, 03/22/2018,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11, 03/22/2018, 03/22/2014&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/197225_Capture.PNG" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Mar 2018 18:25:42 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-03-22T18:25:42Z</dc:date>
    <item>
      <title>Date/month calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Date-month-calculation/m-p/75660#M782216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The highlighted months are showing 13-36 month, can someone help me to fix this.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="date.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/197221_date.JPG" style="height: 155px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-month-calculation/m-p/75660#M782216</guid>
      <dc:creator>karan_kn</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Date/month calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Date-month-calculation/m-p/75661#M782217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you were doing Month comparison in the script.... try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;T1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Len(Trim(Previous_Date)) = 0, 'New',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(AddYears(Previous_Date, 1) &amp;gt;= Current_Date, '1-12 month',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(AddYears(Previous_Date, 3) &amp;gt;= Current_Date, '13-36 month',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(AddYears(Previous_Date, 5) &amp;gt;= Current_Date, '37-60 month')))) as Status;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * INLINE [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID, Current_Date, Previous_Date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, 03/22/2018, 02/27/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2, 03/22/2018, 02/28/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3, 03/22/2018, 02/27/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4, 03/22/2018, 03/03/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5, 03/22/2018, 03/03/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6, 03/22/2018, 03/07/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7, 03/22/2018, 03/01/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8, 03/22/2018, 04/28/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9, 03/22/2018, 03/22/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/197223_Capture.PNG" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2018 18:23:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-month-calculation/m-p/75661#M782217</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-03-22T18:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: Date/month calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Date-month-calculation/m-p/75662#M782218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Modified the script to see the other two options&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;T1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Len(Trim(Previous_Date)) = 0, 'New',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(AddYears(Previous_Date, 1) &amp;gt;= Current_Date, '1-12 month',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(AddYears(Previous_Date, 3) &amp;gt;= Current_Date, '13-36 month',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(AddYears(Previous_Date, 5) &amp;gt;= Current_Date, '37-60 month')))) as Status;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * INLINE [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID, Current_Date, Previous_Date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, 03/22/2018, 02/27/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2, 03/22/2018, 02/28/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3, 03/22/2018, 02/27/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4, 03/22/2018, 03/03/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5, 03/22/2018, 03/03/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6, 03/22/2018, 03/07/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7, 03/22/2018, 03/01/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8, 03/22/2018, 04/28/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9, 03/22/2018, 03/22/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10, 03/22/2018,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11, 03/22/2018, 03/22/2014&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/197225_Capture.PNG" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2018 18:25:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-month-calculation/m-p/75662#M782218</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-03-22T18:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: Date/month calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Date-month-calculation/m-p/75663#M782219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And maybe catch also the older values:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;If(Len(Trim(Previous_Date)) = 0, 'New',&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;If(AddYears(Previous_Date, 1) &amp;gt;= Current_Date, '1-12 month',&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;If(AddYears(Previous_Date, 3) &amp;gt;= Current_Date, '13-36 month',&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;If(AddYears(Previous_Date, 5) &amp;gt;= Current_Date, '37-60 month'&lt;EM&gt;, 'even older than 60 months'&lt;/EM&gt;)))) &lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2018 18:28:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-month-calculation/m-p/75663#M782219</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2018-03-22T18:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: Date/month calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Date-month-calculation/m-p/75664#M782220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good catch &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;... Always good to have a fall back statement to avoid nulls. Thanks Stefan!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2018 18:29:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-month-calculation/m-p/75664#M782220</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-03-22T18:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: Date/month calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Date-month-calculation/m-p/75665#M782221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny and Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2018 03:32:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-month-calculation/m-p/75665#M782221</guid>
      <dc:creator>karan_kn</dc:creator>
      <dc:date>2018-03-23T03:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: Date/month calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Date-month-calculation/m-p/1698099#M782222</link>
      <description>&lt;P&gt;Tab:&lt;/P&gt;&lt;P&gt;load *,&lt;BR /&gt;if(interval(Current_Date-Previous_Date,'DD')&amp;lt;=365,'1-12 Month',&lt;BR /&gt;if(interval(Current_Date-Previous_Date,'DD')&amp;lt;=1095,'13-36 Month',&lt;BR /&gt;if(interval(Current_Date-Previous_Date,'DD')&amp;lt;=1825,'37-60 Month',&lt;BR /&gt;if(isnull(interval(Current_Date-Previous_Date,'DD')),'New'))))as Status,&lt;BR /&gt;if(isnull(interval(Current_Date-Previous_Date,'DD')),0,interval(Current_Date-Previous_Date,'DD')) as DaysDiff;&lt;BR /&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;ID, Current_Date, Previous_Date&lt;/P&gt;&lt;P&gt;1, 03/22/2018, 02/27/2017&lt;/P&gt;&lt;P&gt;2, 03/22/2018, 02/28/2017&lt;/P&gt;&lt;P&gt;3, 03/22/2018, 02/27/2017&lt;/P&gt;&lt;P&gt;4, 03/22/2018, 03/03/2017&lt;/P&gt;&lt;P&gt;5, 03/22/2018, 03/03/2017&lt;/P&gt;&lt;P&gt;6, 03/22/2018, 03/07/2017&lt;/P&gt;&lt;P&gt;7, 03/22/2018, 03/01/2017&lt;/P&gt;&lt;P&gt;8, 03/22/2018, 04/28/2017&lt;/P&gt;&lt;P&gt;9, 03/22/2018, 03/22/2017&lt;BR /&gt;&lt;BR /&gt;10, 03/22/2018,&lt;/P&gt;&lt;P&gt;11, 03/22/2018, 03/22/2014&lt;BR /&gt;];&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 12:29:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-month-calculation/m-p/1698099#M782222</guid>
      <dc:creator>rajaxavier</dc:creator>
      <dc:date>2020-04-30T12:29:51Z</dc:date>
    </item>
  </channel>
</rss>

