<?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: Count based on date range in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-based-on-date-range/m-p/550384#M688043</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Hey use this expression; it's working in my dashboard.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Count({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;gt;=$(=MonthStart(max(Date),-14))&amp;lt;=$(=max(Date))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; 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;month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Quarter&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Dec 2013 05:33:42 GMT</pubDate>
    <dc:creator>brijesh1991</dc:creator>
    <dc:date>2013-12-10T05:33:42Z</dc:date>
    <item>
      <title>Count based on date range</title>
      <link>https://community.qlik.com/t5/QlikView/Count-based-on-date-range/m-p/550379#M688038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having dataset&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;ID&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Date&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;15/10/2013&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;14/10/2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;C&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2/9/2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;D&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;4/5/2012&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;E&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;7/6/2012&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need the count of id's if it coming in &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Audi Type';"&gt; last 15 months from today&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For eg in this case my output will be count(ID) = 3 (i.e. A ,B and C)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2013 01:09:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-based-on-date-range/m-p/550379#M688038</guid>
      <dc:creator />
      <dc:date>2013-12-10T01:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: Count based on date range</title>
      <link>https://community.qlik.com/t5/QlikView/Count-based-on-date-range/m-p/550380#M688039</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;Try this expreesions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For last 15 months&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;Date={'&amp;gt;=$(=AddMonths(Max(Date), -15))&amp;lt;=$(=Date(Max(Date)))'}&amp;gt;} ID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before doing this please check the date formats are correct in Date dimension and =AddMonths(Max(Date), -15), if not format the date like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;Date={"&amp;gt;=$(=Date(AddMonths(Max(Date), -15), 'D/M/YYYY')&amp;lt;=$(=Date(Max(Date), 'D/M/YYYY'))"}&amp;gt;} ID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2013 03:10:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-based-on-date-range/m-p/550380#M688039</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2013-12-10T03:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Count based on date range</title>
      <link>https://community.qlik.com/t5/QlikView/Count-based-on-date-range/m-p/550381#M688040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jagan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;I tried this syntax but it is giving me blank&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({&amp;lt;[Service Header.Completion Date]={"&amp;gt;=$(=Date(AddMonths(Max([Service Header.Completion Date]), -15),'D/M/YYYY')&amp;lt;=$(=Date(today(), 'D/M/YYYY'))"}&amp;gt;} Key_VehicleRetention)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2013 04:32:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-based-on-date-range/m-p/550381#M688040</guid>
      <dc:creator />
      <dc:date>2013-12-10T04:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: Count based on date range</title>
      <link>https://community.qlik.com/t5/QlikView/Count-based-on-date-range/m-p/550382#M688041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Count&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;gt;=$(=AddMonths(Today(), -15))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;} &amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Hope it will help.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2013 04:48:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-based-on-date-range/m-p/550382#M688041</guid>
      <dc:creator>senpradip007</dc:creator>
      <dc:date>2013-12-10T04:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Count based on date range</title>
      <link>https://community.qlik.com/t5/QlikView/Count-based-on-date-range/m-p/550383#M688042</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;Try this expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Count({&amp;lt;Date={"&amp;gt;=$(=Date(AddMonths(Today(), -15), 'D/M/YYYY'))&amp;lt;=$(=Date(Today(), 'D/M/YYYY'))"}&amp;gt;} ID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also please find attached file it is working there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2013 05:27:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-based-on-date-range/m-p/550383#M688042</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2013-12-10T05:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Count based on date range</title>
      <link>https://community.qlik.com/t5/QlikView/Count-based-on-date-range/m-p/550384#M688043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Hey use this expression; it's working in my dashboard.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Count({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;gt;=$(=MonthStart(max(Date),-14))&amp;lt;=$(=max(Date))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; 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;month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Quarter&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2013 05:33:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-based-on-date-range/m-p/550384#M688043</guid>
      <dc:creator>brijesh1991</dc:creator>
      <dc:date>2013-12-10T05:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Count based on date range</title>
      <link>https://community.qlik.com/t5/QlikView/Count-based-on-date-range/m-p/550385#M688044</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;in your script do this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID,&lt;/P&gt;&lt;P&gt;Date(Date,'DD/MM/YYYY') AS Date&lt;/P&gt;&lt;P&gt;from abc&amp;lt;&amp;gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then use expression &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Count({&amp;lt; Date = {"&amp;gt;=$(=AddMonths(Today(), -15))"} &amp;gt;} ID) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you will get answer 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2013 06:40:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-based-on-date-range/m-p/550385#M688044</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-12-10T06:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Count based on date range</title>
      <link>https://community.qlik.com/t5/QlikView/Count-based-on-date-range/m-p/550386#M688045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please check with latest that i edited.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2013 07:14:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-based-on-date-range/m-p/550386#M688045</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-12-10T07:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: Count based on date range</title>
      <link>https://community.qlik.com/t5/QlikView/Count-based-on-date-range/m-p/550387#M688046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First, please create the flag in the table like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vBaseDate = Num(AddMonths(Today(), -15));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(Floor([&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Completion Date&lt;/SPAN&gt;]) &amp;gt; = $(vBaseDate) , 1 ,0) AS 15M_FLAG;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the UI, please use the expression:&amp;nbsp; COUNT({&amp;lt;15M_FLAG={1}&amp;gt;} &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Key_VehicleRetention&lt;/SPAN&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 02:24:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-based-on-date-range/m-p/550387#M688046</guid>
      <dc:creator />
      <dc:date>2013-12-11T02:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Count based on date range</title>
      <link>https://community.qlik.com/t5/QlikView/Count-based-on-date-range/m-p/550388#M688047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks it is working fine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Dec 2013 01:15:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-based-on-date-range/m-p/550388#M688047</guid>
      <dc:creator />
      <dc:date>2013-12-13T01:15:49Z</dc:date>
    </item>
  </channel>
</rss>

