<?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 in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/date/m-p/915233#M317486</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I forgot to mention:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you could get a similar result without scripting an additional field by defining dimension limits in your chart:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_174051_Pic3.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/94161_QlikCommunity_Thread_174051_Pic3.JPG" style="height: 333px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Jul 2015 22:01:37 GMT</pubDate>
    <dc:creator>MarcoWedel</dc:creator>
    <dc:date>2015-07-27T22:01:37Z</dc:date>
    <item>
      <title>date</title>
      <link>https://community.qlik.com/t5/QlikView/date/m-p/915227#M317480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; IF((NUM(date#(PAID_MON,'YYYY-MM'))-NUM(date#(INT_MON,'YYYY-MM')))&amp;gt;150,'&amp;gt;5 MONTHS',INT_MON)As INT_MONTH1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using above syntax in my load script to calculate above 5 months record.But I get the following result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="180"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="82"&gt;PAID_MONTH&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none;" width="98"&gt;INT_MONTH1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;2015-07&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&amp;gt;5 MONTHS&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;2015-07&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;2015-02&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;2015-07&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;2015-03&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;2015-07&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;2015-04&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;2015-07&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;2015-05&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;2015-07&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;2015-06&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;2015-07&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;2015-07&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;2015-07&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none;"&gt;&lt;P&gt;Total&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;It gives 7 months may be due to the fact 28 days in Feb Month. Is there a way to rewrite the above syntax&amp;nbsp; to get the following result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="180"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" width="82"&gt;PAID_MONTH&lt;/TD&gt;&lt;TD class="xl66" style="border-left: none;" width="98"&gt;INT_MONTH1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;2015-07&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;&amp;gt;5 MONTHS&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;2015-07&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;2015-03&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;2015-07&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;2015-04&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;2015-07&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;2015-05&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;2015-07&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;2015-06&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;2015-07&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;2015-07&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;2015-07&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none;"&gt;Total&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Jul 2015 16:09:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/date/m-p/915227#M317480</guid>
      <dc:creator>upaliwije</dc:creator>
      <dc:date>2015-07-26T16:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: date</title>
      <link>https://community.qlik.com/t5/QlikView/date/m-p/915228#M317481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this what you are looking for?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/94022_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&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;&amp;nbsp; IF((Num(Month(date#(PAID_MON,'YYYY-MM')))-Num(Month(date#(INT_MON,'YYYY-MM'))))&amp;gt;4,'&amp;gt;5 MONTHS',INT_MON)As INT_MONTH1;&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;PAID_MON, INT_MON&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2015-07, 2015-01&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2015-07, 2015-02&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2015-07, 2015-03&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2015-07, 2015-04&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2015-07, 2015-05&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2015-07, 2015-06&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2015-07, 2015-07&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Jul 2015 20:18:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/date/m-p/915228#M317481</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-07-26T20:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: date</title>
      <link>https://community.qlik.com/t5/QlikView/date/m-p/915229#M317482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;another solution could be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_174051_Pic2.JPG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/94025_QlikCommunity_Thread_174051_Pic2.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_174051_Pic1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/94015_QlikCommunity_Thread_174051_Pic1.JPG" style="height: 635px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14379456316296035 jive_text_macro" jivemacro_uid="_14379456316296035"&gt;
&lt;P&gt;LOAD *,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ceil(Rand()*1000) as Amount,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If((Year(PAID_MON)-Year(INT_MON))*12+(Month(PAID_MON)-Month(INT_MON))&amp;gt;4,Dual('&amp;gt;5 MONTHS',1),INT_MON) as INT_MONTH1;&lt;/P&gt;
&lt;P&gt;LOAD Date#(PAID_MON,'YYYY-MM') as PAID_MON,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date#(INT_MON,'YYYY-MM') as INT_MON&lt;/P&gt;
&lt;P&gt;Inline [&lt;/P&gt;
&lt;P&gt;PAID_MON, INT_MON&lt;/P&gt;
&lt;P&gt;2015-07, 2014-11&lt;/P&gt;
&lt;P&gt;2015-07, 2014-12&lt;/P&gt;
&lt;P&gt;2015-07, 2015-01&lt;/P&gt;
&lt;P&gt;2015-07, 2015-02&lt;/P&gt;
&lt;P&gt;2015-07, 2015-03&lt;/P&gt;
&lt;P&gt;2015-07, 2015-04&lt;/P&gt;
&lt;P&gt;2015-07, 2015-05&lt;/P&gt;
&lt;P&gt;2015-07, 2015-06&lt;/P&gt;
&lt;P&gt;2015-07, 2015-07&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Jul 2015 21:21:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/date/m-p/915229#M317482</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2015-07-26T21:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: date</title>
      <link>https://community.qlik.com/t5/QlikView/date/m-p/915230#M317483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Wedel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot . I learned a lot from your example. Pls also explain me following line in your syntax&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f8f8f8;"&gt; Ceil(Rand()*1000) as Amount, &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 03:56:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/date/m-p/915230#M317483</guid>
      <dc:creator>upaliwije</dc:creator>
      <dc:date>2015-07-27T03:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: date</title>
      <link>https://community.qlik.com/t5/QlikView/date/m-p/915231#M317484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you're welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f8f8f8;"&gt;Ceil(Rand()*1000) as Amount,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f8f8f8;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f8f8f8;"&gt;only creates some random data I used in the bar chart.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f8f8f8;"&gt;This line is not required for this solution.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f8f8f8;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f8f8f8;"&gt;regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f8f8f8;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f8f8f8;"&gt;Marco&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 10:51:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/date/m-p/915231#M317484</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2015-07-27T10:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: date</title>
      <link>https://community.qlik.com/t5/QlikView/date/m-p/915232#M317485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 11:08:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/date/m-p/915232#M317485</guid>
      <dc:creator>upaliwije</dc:creator>
      <dc:date>2015-07-27T11:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: date</title>
      <link>https://community.qlik.com/t5/QlikView/date/m-p/915233#M317486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I forgot to mention:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you could get a similar result without scripting an additional field by defining dimension limits in your chart:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_174051_Pic3.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/94161_QlikCommunity_Thread_174051_Pic3.JPG" style="height: 333px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 22:01:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/date/m-p/915233#M317486</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2015-07-27T22:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: date</title>
      <link>https://community.qlik.com/t5/QlikView/date/m-p/915234#M317487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your advice. Can I please contact you through email whenever I want your help in respect of QV issue. That would be a great favour.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 00:19:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/date/m-p/915234#M317487</guid>
      <dc:creator>upaliwije</dc:creator>
      <dc:date>2015-07-28T00:19:58Z</dc:date>
    </item>
  </channel>
</rss>

