<?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: How to analyse the certain individuals from certain period over specified period? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-count-distinct-records-from-two-range-of-dates/m-p/1371689#M618209</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;You can create two tables with a date field, one to select from date and the other to select to date.&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;YourDate as &lt;SPAN style="font-size: 13.3333px;"&gt;DateFrom&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;resident yourData;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Table2:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;load&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;YourDate as &lt;SPAN style="font-size: 13.3333px;"&gt;DateTo&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;resident yourData;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then create 2 variables as follows:&lt;/P&gt;&lt;P&gt;vFrom =MinString(DateFrom)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;vTo =MinString(DateTo)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;And then use the following expression:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Sum(if(yourDate&amp;gt;=vFrom and yourDate&amp;lt;=vTo,yourValue,0))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The expression should be able to do with whole analysis, but I can not make it work.&lt;/P&gt;&lt;P&gt;When you select a DateFrom value and a DateTo value, you should display the data that is between those dates.&lt;/P&gt;&lt;P&gt;I hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 May 2017 13:55:23 GMT</pubDate>
    <dc:creator>spividori</dc:creator>
    <dc:date>2017-05-05T13:55:23Z</dc:date>
    <item>
      <title>How to count distinct records from two range of dates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-distinct-records-from-two-range-of-dates/m-p/1371688#M618208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello legends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am very new to Qlik I need your help on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have long range of transaction data, I wanted to count the customer who is in the range of date1 and I wanted to count them if there are exist in another date range. I have a data like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;ID&amp;nbsp;&amp;nbsp;&amp;nbsp; Date&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30-12-2015&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1-1-2016&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1-1-2016&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2-1-2016&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2-1-2016&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&lt;SPAN style="font-size: 13.3333px;"&gt;-1-2016&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;-1-2016&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&lt;SPAN style="font-size: 13.3333px;"&gt;-1-2016&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;9&amp;nbsp;&amp;nbsp;&amp;nbsp; 14&lt;SPAN style="font-size: 13.3333px;"&gt;-1-2016&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&lt;SPAN style="font-size: 13.3333px;"&gt;-1-2016&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&lt;SPAN style="font-size: 13.3333px;"&gt;-1-2016&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp; 17&lt;SPAN style="font-size: 13.3333px;"&gt;-1-2016&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;1&amp;nbsp;&amp;nbsp; 18&lt;SPAN style="font-size: 13.3333px;"&gt;-1-2016&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Expression should satisfy in the following case,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Case (Exclusive Date Range):&lt;/P&gt;&lt;P&gt;Base Date Range1: 01-01-2016 to 02-01-2016&lt;/P&gt;&lt;P&gt;Analysis Date Range2: 15-01-2016 to 18-01-2016&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From the base period range, Expression will select the ID's 1,2,3,4 then I need to count the ID's in analysis period date which matches with the Base period ID's. i.e. the matching value is 1,2. So I need the output as 2 (count of ID).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know I have to write the set analysis, but I am new to Qlik. I tried my best but still, I cannot get the expression. I have attached my sample data and .qvf with the attempt I took in this discussion. Please help and let me learn Qlik.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mohan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 May 2017 09:59:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-distinct-records-from-two-range-of-dates/m-p/1371688#M618208</guid>
      <dc:creator>mohan_1105</dc:creator>
      <dc:date>2017-05-05T09:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to analyse the certain individuals from certain period over specified period?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-distinct-records-from-two-range-of-dates/m-p/1371689#M618209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;You can create two tables with a date field, one to select from date and the other to select to date.&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;YourDate as &lt;SPAN style="font-size: 13.3333px;"&gt;DateFrom&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;resident yourData;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Table2:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;load&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;YourDate as &lt;SPAN style="font-size: 13.3333px;"&gt;DateTo&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;resident yourData;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then create 2 variables as follows:&lt;/P&gt;&lt;P&gt;vFrom =MinString(DateFrom)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;vTo =MinString(DateTo)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;And then use the following expression:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Sum(if(yourDate&amp;gt;=vFrom and yourDate&amp;lt;=vTo,yourValue,0))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The expression should be able to do with whole analysis, but I can not make it work.&lt;/P&gt;&lt;P&gt;When you select a DateFrom value and a DateTo value, you should display the data that is between those dates.&lt;/P&gt;&lt;P&gt;I hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 May 2017 13:55:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-distinct-records-from-two-range-of-dates/m-p/1371689#M618209</guid>
      <dc:creator>spividori</dc:creator>
      <dc:date>2017-05-05T13:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to analyse the certain individuals from certain period over specified period?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-distinct-records-from-two-range-of-dates/m-p/1371690#M618210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;With set analysis:&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;yourDate&lt;/SPAN&gt;={"$(='&amp;gt;=' &amp;amp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;DateFrom&lt;/SPAN&gt;&amp;amp; ' &amp;lt;=' &amp;amp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;DateTo&lt;/SPAN&gt;)"}&amp;gt;} &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;yourValue&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;And you do not need to create the variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 May 2017 14:22:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-distinct-records-from-two-range-of-dates/m-p/1371690#M618210</guid>
      <dc:creator>spividori</dc:creator>
      <dc:date>2017-05-05T14:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to analyse the certain individuals from certain period over specified period?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-distinct-records-from-two-range-of-dates/m-p/1371691#M618211</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;The expression works only with one range of value, what I am expecting is select the ID from one range of date and looking whether that ID is turned up in another range of date. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that I have to write a set analysis inside the set analysis. I have attached the data and App in this discussion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help I have no I idea how to write the expression and let me learn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mohan !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2017 14:44:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-distinct-records-from-two-range-of-dates/m-p/1371691#M618211</guid>
      <dc:creator>mohan_1105</dc:creator>
      <dc:date>2017-05-10T14:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to count distinct records from two range of dates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-distinct-records-from-two-range-of-dates/m-p/1371692#M618212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your heads up. It works perfect for the inclusive date range and It fails when the case like i mentioned in the question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again..!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2017 17:35:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-distinct-records-from-two-range-of-dates/m-p/1371692#M618212</guid>
      <dc:creator>mohan_1105</dc:creator>
      <dc:date>2017-05-10T17:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to count distinct records from two range of dates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-distinct-records-from-two-range-of-dates/m-p/1371693#M618213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The solution for this post is shown in the following thread. &lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/message/1266142"&gt;Re: How to count distinct record with the condition match two diff. date range?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2017 10:18:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-distinct-records-from-two-range-of-dates/m-p/1371693#M618213</guid>
      <dc:creator>mohan_1105</dc:creator>
      <dc:date>2017-05-11T10:18:58Z</dc:date>
    </item>
  </channel>
</rss>

