<?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: Need help on Set Analysis (Count of record between two dates) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-help-on-Set-Analysis-Count-of-record-between-two-dates/m-p/904307#M314415</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's what I suggested her to use variables not directly min(date) and max date . &lt;/P&gt;&lt;P&gt;Expression was just a sample .. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Jun 2015 12:32:43 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-06-03T12:32:43Z</dc:date>
    <item>
      <title>Need help on Set Analysis (Count of record between two dates)</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-on-Set-Analysis-Count-of-record-between-two-dates/m-p/904301#M314409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="pic1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/88248_pic1.JPG" style="height: auto;" /&gt;hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a source field with following type of date structure&amp;nbsp; , please see above,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now&amp;nbsp; I have converted this format to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2.JPG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/88249_2.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using following expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;MakeDate&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;date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;right&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Year Month]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,2),'YYYY'),'YYYY')),&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;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Year Month]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,3),'MMM'),'MMM')))),'YYYYMMDD') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;from this I found min and max date . &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;And I am trying to find the count of employee between min date and max date . &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;I have tried many things but it always comes zero.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Please help....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2015 12:13:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-on-Set-Analysis-Count-of-record-between-two-dates/m-p/904301#M314409</guid>
      <dc:creator>neha_sri</dc:creator>
      <dc:date>2015-06-03T12:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on Set Analysis (Count of record between two dates)</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-on-Set-Analysis-Count-of-record-between-two-dates/m-p/904302#M314410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Neha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have a sample document to look at? However, if you are planing to count every employee between min and max date - will that not mean that you should could all of the employees? Or do you have employees without any date connected to them? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2015 12:20:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-on-Set-Analysis-Count-of-record-between-two-dates/m-p/904302#M314410</guid>
      <dc:creator />
      <dc:date>2015-06-03T12:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on Set Analysis (Count of record between two dates)</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-on-Set-Analysis-Count-of-record-between-two-dates/m-p/904303#M314411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you provide some sample data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2015 12:21:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-on-Set-Analysis-Count-of-record-between-two-dates/m-p/904303#M314411</guid>
      <dc:creator>ankit777</dc:creator>
      <dc:date>2015-06-03T12:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on Set Analysis (Count of record between two dates)</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-on-Set-Analysis-Count-of-record-between-two-dates/m-p/904304#M314412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Neha&lt;/P&gt;&lt;P&gt;you can use below format : &lt;/P&gt;&lt;P&gt;Count({$&amp;lt;Date = {"&amp;gt;=$(=Min(Date))&amp;lt;=$(=Max(Date))"}&amp;gt;}EMPLID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for Min and max date you need to create two variables and use those variables here in Set analysis. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for min and max date : you may need to create two different date column in your model.(So that selection will not over write)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just attached your sample app that would be helpful. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;BKC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2015 12:25:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-on-Set-Analysis-Count-of-record-between-two-dates/m-p/904304#M314412</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-03T12:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on Set Analysis (Count of record between two dates)</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-on-Set-Analysis-Count-of-record-between-two-dates/m-p/904305#M314413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;also try to see the variables in a text box and make sure they are not converting into number (they should be in same format as your original date column)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2015 12:27:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-on-Set-Analysis-Count-of-record-between-two-dates/m-p/904305#M314413</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-03T12:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on Set Analysis (Count of record between two dates)</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-on-Set-Analysis-Count-of-record-between-two-dates/m-p/904306#M314414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/balkumarchandel"&gt;balkumarchandel chandel&lt;/A&gt;‌, this might not work as the Min and Max will change the Date into Number format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Count({$&amp;lt;Date = {"&amp;gt;=$(=Min(Date))&amp;lt;=$(=Max(Date))"}&amp;gt;}EMPLID)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;She might need this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;Count({$&amp;lt;Date = {"&amp;gt;=$(=Date(Min(Date), 'YYYYMMDD'))&amp;lt;=$(=Date(Max(Date), 'YYYYMMDD'))"}&amp;gt;}EMPLID) &lt;/STRONG&gt; or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Count({$&amp;lt;Date = {"$(='&amp;gt;=' &amp;amp; Date(Min(Date), 'YYYYMMDD') &amp;amp; '&amp;lt;=' &amp;amp; Date(Max(Date), 'YYYYMMDD'))"}&amp;gt;}EMPLID)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2015 12:28:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-on-Set-Analysis-Count-of-record-between-two-dates/m-p/904306#M314414</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-06-03T12:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on Set Analysis (Count of record between two dates)</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-on-Set-Analysis-Count-of-record-between-two-dates/m-p/904307#M314415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's what I suggested her to use variables not directly min(date) and max date . &lt;/P&gt;&lt;P&gt;Expression was just a sample .. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2015 12:32:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-on-Set-Analysis-Count-of-record-between-two-dates/m-p/904307#M314415</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-03T12:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on Set Analysis (Count of record between two dates)</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-on-Set-Analysis-Count-of-record-between-two-dates/m-p/904308#M314416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Neha can you just reduce your data and share a sample application if possible. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2015 12:35:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-on-Set-Analysis-Count-of-record-between-two-dates/m-p/904308#M314416</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-03T12:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on Set Analysis (Count of record between two dates)</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-on-Set-Analysis-Count-of-record-between-two-dates/m-p/904309#M314417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;‌and that is why I liked your second comment&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2015 12:36:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-on-Set-Analysis-Count-of-record-between-two-dates/m-p/904309#M314417</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-06-03T12:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on Set Analysis (Count of record between two dates)</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-on-Set-Analysis-Count-of-record-between-two-dates/m-p/904310#M314418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Firstly, you can simplify your date expression to (in the load script):&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Date(Date#([Year Month], 'MMM-YY'), 'YYYYMMDD') As Date,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From your post, it looks like you are calculting this date in the front end. I suggest that you use the expression above in your load script to load the date as a proper QV date value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You do not give any examples of what you tried, but assuming you created a date field as suggested and that employees can be counted using a field like EmployeeID, you need something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Count({&amp;lt;Date = {"&amp;gt;=$(=Date(Min(Date))) &amp;lt;=$(=Date(Max(Date)))"}&amp;gt; EmployeeID})&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If nothing is selected, that will count all employees with a non-null Date. If you select some dates, it will count employees from the minimum selected date to the maximum selected date&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2015 12:36:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-on-Set-Analysis-Count-of-record-between-two-dates/m-p/904310#M314418</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-06-03T12:36:21Z</dc:date>
    </item>
  </channel>
</rss>

