<?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 if date &amp;gt;= AND &amp;lt;= than value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/count-if-date-gt-AND-lt-than-value/m-p/404799#M1149056</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use set analysis but make your live easier: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create time dimensions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Year(orderdate)&lt;/P&gt;&lt;P&gt;month(orderdate)&lt;/P&gt;&lt;P&gt;week(orderdate)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and so on. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then just use the simple expression count(distinct ordernr) and select a month, year or week combination you want. Also you can just set the set analysis to the right monthnmbr: &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;Count({$&amp;lt;Ordernr={'40*', '9*'}, month = {'4'}&amp;gt;} DISTINCT Ordernr)&lt;/SPAN&gt; or&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;Count({$&amp;lt;Ordernr={'40*', '9*'}, month = {"=$(vMonthNumber)"}&amp;gt;} DISTINCT Ordernr)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 May 2013 11:48:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-05-24T11:48:11Z</dc:date>
    <item>
      <title>count if date &gt;= AND &lt;= than value</title>
      <link>https://community.qlik.com/t5/QlikView/count-if-date-gt-AND-lt-than-value/m-p/404796#M1149053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question concerning dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following table: two dimensions (type and shop)&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="41631" class="jive-image jiveImage" alt="Knipsel.JPG" src="https://community.qlik.com/legacyfs/online/41631_Knipsel.JPG" /&gt;&lt;/P&gt;&lt;P&gt;"Amount" shows the amount of deliveries/pick up's. You find the value "amount" with the following expression:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;=(Count({$&amp;lt;Ordernr={'40*', '9*'}&amp;gt;}DISTINCT Ordernr))&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Ordernr is the code a delivery/pick up gets. So it just counts the number of codes starting with 40* or 9* (pick up and delivery).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;BUT:&lt;/STRONG&gt;&lt;/SPAN&gt; I now need the amount of deliveries/pick up's for a &lt;STRONG&gt;specific month.&lt;/STRONG&gt; The date can be found in the dimension "date" (DD/MM/YYYY)&lt;/P&gt;&lt;P&gt;How can I tell Qlikview which month it needs to take into consideration?&lt;/P&gt;&lt;P&gt;something like&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;if( date &amp;gt;= 01/04/2013 AND &amp;lt;=30/04/2013, Count({$&amp;lt;Ordernr={'40*', '9*'}&amp;gt;}DISTINCT Ordernr)))&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;But it does not show me any values..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I should be able to count the amount of orders in a specific month. The "date" can not be selected as a value, cus I need to be able to count it for different months in different expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Who can help me please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks alot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Zipke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2013 11:15:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-if-date-gt-AND-lt-than-value/m-p/404796#M1149053</guid>
      <dc:creator />
      <dc:date>2013-05-24T11:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: count if date &gt;= AND &lt;= than value</title>
      <link>https://community.qlik.com/t5/QlikView/count-if-date-gt-AND-lt-than-value/m-p/404797#M1149054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;if( date &amp;gt;= 01/04/2013 and date &amp;lt;=30/04/2013, Count({$&amp;lt;Ordernr={'40*', '9*'}&amp;gt;}DISTINCT Ordernr))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2013 11:17:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-if-date-gt-AND-lt-than-value/m-p/404797#M1149054</guid>
      <dc:creator />
      <dc:date>2013-05-24T11:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: count if date &gt;= AND &lt;= than value</title>
      <link>https://community.qlik.com/t5/QlikView/count-if-date-gt-AND-lt-than-value/m-p/404798#M1149055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Zipke,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this set analysis and let me know the result&lt;/P&gt;&lt;P&gt;Count({$&amp;lt;Ordernr={'40*', '9*'}, date = {"&amp;gt;=01/04/2013&amp;lt;=30/04/2013"}&amp;gt;} DISTINCT Ordernr)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sokkorn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2013 11:20:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-if-date-gt-AND-lt-than-value/m-p/404798#M1149055</guid>
      <dc:creator>Sokkorn</dc:creator>
      <dc:date>2013-05-24T11:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: count if date &gt;= AND &lt;= than value</title>
      <link>https://community.qlik.com/t5/QlikView/count-if-date-gt-AND-lt-than-value/m-p/404799#M1149056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use set analysis but make your live easier: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create time dimensions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Year(orderdate)&lt;/P&gt;&lt;P&gt;month(orderdate)&lt;/P&gt;&lt;P&gt;week(orderdate)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and so on. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then just use the simple expression count(distinct ordernr) and select a month, year or week combination you want. Also you can just set the set analysis to the right monthnmbr: &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;Count({$&amp;lt;Ordernr={'40*', '9*'}, month = {'4'}&amp;gt;} DISTINCT Ordernr)&lt;/SPAN&gt; or&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;Count({$&amp;lt;Ordernr={'40*', '9*'}, month = {"=$(vMonthNumber)"}&amp;gt;} DISTINCT Ordernr)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2013 11:48:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-if-date-gt-AND-lt-than-value/m-p/404799#M1149056</guid>
      <dc:creator />
      <dc:date>2013-05-24T11:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: count if date &gt;= AND &lt;= than value</title>
      <link>https://community.qlik.com/t5/QlikView/count-if-date-gt-AND-lt-than-value/m-p/404800#M1149057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;try this&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Count({$&amp;lt;Ordernr = p({$&amp;lt;date ={"&amp;gt;= 01/04/2013&amp;lt;=30/04/2013"},Ordernr={'40*','9*'}&amp;gt;}Ordernr)&amp;gt;} DISTINCT Ordernr)&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;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;or try this&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Count({$&amp;lt;Ordernr = p({$&amp;lt;date ={"&amp;gt;= 01/04/2013&amp;lt;=30/04/2013"},Ordernr={'40*','9*'}&amp;gt;})&amp;gt;} DISTINCT Ordernr)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2013 12:15:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-if-date-gt-AND-lt-than-value/m-p/404800#M1149057</guid>
      <dc:creator />
      <dc:date>2013-05-24T12:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: count if date &gt;= AND &lt;= than value</title>
      <link>https://community.qlik.com/t5/QlikView/count-if-date-gt-AND-lt-than-value/m-p/404801#M1149058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks already for the replies.&lt;/P&gt;&lt;P&gt;I am checking the results, since some of them give me different numbers..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have one last question though, the date is nog in DD/MM/YYYY. I changed it in my chart to number&amp;gt;date, but when I do not do this, it just gives me the standard numbers eg. 01/01/2013 = 46523&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this change somehting to the expression I need to use?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Zipke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2013 12:57:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-if-date-gt-AND-lt-than-value/m-p/404801#M1149058</guid>
      <dc:creator />
      <dc:date>2013-05-24T12:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: count if date &gt;= AND &lt;= than value</title>
      <link>https://community.qlik.com/t5/QlikView/count-if-date-gt-AND-lt-than-value/m-p/404802#M1149059</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;Count( {$&amp;lt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;date&lt;/SPAN&gt; ={"$(='&amp;gt;=' &amp;amp; Date#('01/04/2013','DD/MM/YYYY') &amp;amp; '&amp;lt;='&amp;amp; Date#('30/04/2013','DD/MM/YYYY'))"}&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt; ,Ordernr={'40*', '9*'}&lt;/SPAN&gt; &amp;gt;}DISTINCT &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt; Ordernr&lt;/SPAN&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2013 13:34:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-if-date-gt-AND-lt-than-value/m-p/404802#M1149059</guid>
      <dc:creator>er_mohit</dc:creator>
      <dc:date>2013-05-24T13:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: count if date &gt;= AND &lt;= than value</title>
      <link>https://community.qlik.com/t5/QlikView/count-if-date-gt-AND-lt-than-value/m-p/404803#M1149060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you change the date format in number then write&lt;/P&gt;&lt;P&gt;num(datefield)&amp;nbsp; or&amp;nbsp;&amp;nbsp; num(date('01/04/2013'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF you change the num in date then write this&lt;/P&gt;&lt;P&gt;date(datefield)&amp;nbsp; or date('01/04/2013')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if your problem resolved then marked it as either correct or helpful according to your question so that it might be helpful for other developer&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vishwaranjan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 07:33:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-if-date-gt-AND-lt-than-value/m-p/404803#M1149060</guid>
      <dc:creator />
      <dc:date>2013-05-28T07:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: count if date &gt;= AND &lt;= than value</title>
      <link>https://community.qlik.com/t5/QlikView/count-if-date-gt-AND-lt-than-value/m-p/404804#M1149061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you vishwaranjan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been trying all the options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I will mark a reply as correct or helpful, don't worry, but only once I am 100% sure it is correct. It gives me values that I did not expect, so I have to check the results first, but did not have the time yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Zipke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 07:36:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-if-date-gt-AND-lt-than-value/m-p/404804#M1149061</guid>
      <dc:creator />
      <dc:date>2013-05-28T07:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: count if date &gt;= AND &lt;= than value</title>
      <link>https://community.qlik.com/t5/QlikView/count-if-date-gt-AND-lt-than-value/m-p/404805#M1149062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks to all for the reactions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expressions of Sokkorn and er.mohit were the correct ones.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vishwaranjan, thanks to you too. For some reason it did not work for 100%, so I prefere to use the other ones.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers for the quick replies!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Zipke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 May 2013 09:00:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-if-date-gt-AND-lt-than-value/m-p/404805#M1149062</guid>
      <dc:creator />
      <dc:date>2013-05-29T09:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: count if date &gt;= AND &lt;= than value</title>
      <link>https://community.qlik.com/t5/QlikView/count-if-date-gt-AND-lt-than-value/m-p/404806#M1149063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Sokkorn, I am using your expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just one question, it should not happen, it was by mistake, but I get values when I enter:&lt;/P&gt;&lt;P&gt;Count({$&amp;lt;Ordernr={'40*', '60*', '70*', '9*'}, Date = {"&amp;gt;=&lt;STRONG&gt;01/03/2013&amp;lt;=31/01/2013&lt;/STRONG&gt;"}&amp;gt;} DISTINCT Ordernr)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How is that possible? &lt;/P&gt;&lt;P&gt;Is there AND, or OR between the dates? I cannot figure out why it counts that much values.&lt;/P&gt;&lt;P&gt;Is it only showing me the values that equal 01/03/2013 +&amp;nbsp; the values that equal 31/01/2013, is this how I should interprete this mistake?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 May 2013 09:36:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-if-date-gt-AND-lt-than-value/m-p/404806#M1149063</guid>
      <dc:creator />
      <dc:date>2013-05-29T09:36:42Z</dc:date>
    </item>
  </channel>
</rss>

