<?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 based on date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-if-based-on-date/m-p/116218#M17888</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a follow up question.&amp;nbsp; I have one column that counts the orders that are on time and one that counts the orders that are complete.&amp;nbsp; Now I need a column that counts the orders that are both on time and complete.&amp;nbsp; The formula appears to only count the orders that are on time.&amp;nbsp; Thank you for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; {&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;%Order&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"=QtyOrd=QtyShip"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;%Order&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"=InvoiceDate=PromiseDate"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;OrderNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Aug 2018 13:22:44 GMT</pubDate>
    <dc:creator>lfholland</dc:creator>
    <dc:date>2018-08-08T13:22:44Z</dc:date>
    <item>
      <title>Count if based on date</title>
      <link>https://community.qlik.com/t5/QlikView/Count-if-based-on-date/m-p/116214#M17884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to count the number of orders where the promised date and invoiced date are the same.&amp;nbsp; I have tried the below formula along with several variations.&amp;nbsp; The answer keeps coming up as zero.&amp;nbsp; Perhaps one issue is the date formats of each dimension?&amp;nbsp; Invoice Date is MM/DD/YY and Promise Date is that plus the time...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; {&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;InvoiceDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"=PromiseDate"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;OrderNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2018 20:50:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-if-based-on-date/m-p/116214#M17884</guid>
      <dc:creator>lfholland</dc:creator>
      <dc:date>2018-08-07T20:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: Count if based on date</title>
      <link>https://community.qlik.com/t5/QlikView/Count-if-based-on-date/m-p/116215#M17885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Make sure that you have a field in the table that is a unique row identifier. If you don't have it already you can create it by adding this in the load statement in your load script while loading the table:&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; ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RowNo() AS Unique_RowID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PromiseDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; InvoiceDate,&lt;/P&gt;&lt;P&gt; ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can use this expression:&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: 8pt; font-family: inherit; color: #0000ff;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt; {&amp;lt;Unique_RowID={"=&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;InvoiceDate&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;=PromiseDate"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;OrderNumber&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2018 22:14:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-if-based-on-date/m-p/116215#M17885</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2018-08-07T22:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: Count if based on date</title>
      <link>https://community.qlik.com/t5/QlikView/Count-if-based-on-date/m-p/116216#M17886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create another field, something like "PromiseDateFormatted", which looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;date(PromiseDate, 'MM/DD/YYYY') AS PromiseDateFormatted&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then replace "PromiseDate" with "PromiseDateFormatted" in your set analysis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2018 22:19:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-if-based-on-date/m-p/116216#M17886</guid>
      <dc:creator>howiekrauth</dc:creator>
      <dc:date>2018-08-07T22:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: Count if based on date</title>
      <link>https://community.qlik.com/t5/QlikView/Count-if-based-on-date/m-p/116217#M17887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Petter and Howie!&amp;nbsp; I had to do both but with the two combined, it worked!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2018 13:12:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-if-based-on-date/m-p/116217#M17887</guid>
      <dc:creator>lfholland</dc:creator>
      <dc:date>2018-08-08T13:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Count if based on date</title>
      <link>https://community.qlik.com/t5/QlikView/Count-if-based-on-date/m-p/116218#M17888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a follow up question.&amp;nbsp; I have one column that counts the orders that are on time and one that counts the orders that are complete.&amp;nbsp; Now I need a column that counts the orders that are both on time and complete.&amp;nbsp; The formula appears to only count the orders that are on time.&amp;nbsp; Thank you for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; {&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;%Order&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"=QtyOrd=QtyShip"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;%Order&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"=InvoiceDate=PromiseDate"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;OrderNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2018 13:22:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-if-based-on-date/m-p/116218#M17888</guid>
      <dc:creator>lfholland</dc:creator>
      <dc:date>2018-08-08T13:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: Count if based on date</title>
      <link>https://community.qlik.com/t5/QlikView/Count-if-based-on-date/m-p/116219#M17889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In a single set expression you can only refer to a single field once. You have referred to %Order twice and Qlik will simply ignore the first (I think) and honour the last one...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you will have to rather use &lt;STRONG&gt;AND&lt;/STRONG&gt; in a single search and make an expression like this:&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: 8pt; font-family: inherit; color: #0000ff;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt; {&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;%Order&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;"=QtyOrd=QtyShip &lt;STRONG&gt;AND&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;InvoiceDate=PromiseDate"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;OrderNumber&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2018 13:45:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-if-based-on-date/m-p/116219#M17889</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2018-08-08T13:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: Count if based on date</title>
      <link>https://community.qlik.com/t5/QlikView/Count-if-based-on-date/m-p/116220#M17890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2018 13:53:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-if-based-on-date/m-p/116220#M17890</guid>
      <dc:creator>lfholland</dc:creator>
      <dc:date>2018-08-08T13:53:25Z</dc:date>
    </item>
  </channel>
</rss>

