<?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 Multiple Conditions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-Multiple-Conditions/m-p/367953#M136840</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for offering help.&amp;nbsp; I ran against a few more issues with the expression you suggested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I'm not sure if this will make sense -- The PROJECT_DT field doesn't appear to be recognized by the Expression Editor as its own field.&amp;nbsp; For instance, the other field names appear in brown formatting where PROJECT_DT is in black, even when I manually add back PROJECT_DT to the expression.&amp;nbsp; Maybe the data format is not being recognized as a date to compare against?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. When I apply the INTX_CATEGORY=PROJECT_CATEGORY portion of the expression separately, it evaluates to a count of zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: #0070c0; font-size: 10pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: black; font-size: 10pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: #996633; font-size: 10pt;"&gt;Int_ID&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: black; font-size: 10pt;"&gt;={'*'},&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: #996633; font-size: 10pt;"&gt;INTX_CATEGORY&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: black; font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: #996633; font-size: 10pt;"&gt;PROJECT_CATEGORY&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: black; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: #996633; font-size: 10pt;"&gt;INTX_DATE&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: black; font-size: 10pt;"&gt;={'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; font-size: 10pt;"&gt;&amp;gt;=PROJECT_DT'&lt;SPAN style="color: black;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #0070c0;"&gt;Distinct&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #996633;"&gt;Customer&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Jul 2012 19:09:22 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-07-25T19:09:22Z</dc:date>
    <item>
      <title>Count Multiple Conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Multiple-Conditions/m-p/367948#M136835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I’m trying to count customers who are associated with a project and have interacted with an event (an interaction is denoted where the INT_ID is not null).&amp;nbsp; My expression was successful with the following formula: &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;INT_ID&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;={'*'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Distinct&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;CUSTOMER&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I would like to add two additional conditions to the count:&lt;/P&gt;&lt;OL start="1" style="list-style-type: decimal;"&gt;&lt;LI&gt;Count only customers whose interaction category equals the project category.&amp;nbsp; Something along these lines:&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;INTX_CATEGORY&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;PROJECT_CATEGORY&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Distinct&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;CUSTOMER&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;OL start="1" style="list-style-type: decimal;"&gt;&lt;LI&gt;Count only customers whose interaction date &amp;gt;=project date.&amp;nbsp; I tried the following, but no luck.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;INTX_DATE&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;"&amp;gt;=PROJECT_DT"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Distinct&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;CUSTOMER&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: black; font-size: 9pt;"&gt;If possible, I'd like to wrap all three conditions into a single expression.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2012 17:50:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Multiple-Conditions/m-p/367948#M136835</guid>
      <dc:creator />
      <dc:date>2012-07-25T17:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: Count Multiple Conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Multiple-Conditions/m-p/367949#M136836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;why don't you just add those three expressions together?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12.222222328186035px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;INT_ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;={'*'},&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;INTX_CATEGORY&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;PROJECT_CATEGORY&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;},&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;INTX_DATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;"&amp;gt;=PROJECT_DT"&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;}&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;Distinct &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;CUSTOMER&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2012 18:18:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Multiple-Conditions/m-p/367949#M136836</guid>
      <dc:creator />
      <dc:date>2012-07-25T18:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: Count Multiple Conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Multiple-Conditions/m-p/367950#M136837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;You can use a comma to add multiple conditions. For example:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;count({$&amp;lt;Int_ID={'*'},INTX_CATEGORY={PROJECT_CATEGORY},INTX_DATE={"&amp;gt;=PROJECT_DT"}&amp;gt;}Distinct Customer) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2012 18:19:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Multiple-Conditions/m-p/367950#M136837</guid>
      <dc:creator />
      <dc:date>2012-07-25T18:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Count Multiple Conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Multiple-Conditions/m-p/367951#M136838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the replies.&amp;nbsp; Per my original message, yes, I’m trying to merge them into a single expression.&amp;nbsp; My problem isn’t with the structure of the expression.&amp;nbsp; My problem is with the &lt;SPAN style="text-decoration: underline;"&gt;syntax&lt;/SPAN&gt; for each of the two conditions shown below.&amp;nbsp; I’m trying to count customers where the interaction category matches the value in the project category, and I want it limited to customers where the interaction date is on or after the project date.&amp;nbsp; If you have any insight, that would be great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;INTX_CATEGORY&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;PROJECT_CATEGORY&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Distinct&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;CUSTOMER&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;)&lt;/SPAN&gt;﻿&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;INTX_DATE&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;"&amp;gt;=PROJECT_DT"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Distinct&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;CUSTOMER&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2012 18:23:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Multiple-Conditions/m-p/367951#M136838</guid>
      <dc:creator />
      <dc:date>2012-07-25T18:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: Count Multiple Conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Multiple-Conditions/m-p/367952#M136839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;Try the following syntax:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;count({$&amp;lt;Int_ID={'*'},INTX_CATEGORY=PROJECT_CATEGORY,INTX_DATE={'&amp;gt;=PROJECT_DT'}&amp;gt;}Distinct Customer) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2012 18:36:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Multiple-Conditions/m-p/367952#M136839</guid>
      <dc:creator />
      <dc:date>2012-07-25T18:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Count Multiple Conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Multiple-Conditions/m-p/367953#M136840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for offering help.&amp;nbsp; I ran against a few more issues with the expression you suggested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I'm not sure if this will make sense -- The PROJECT_DT field doesn't appear to be recognized by the Expression Editor as its own field.&amp;nbsp; For instance, the other field names appear in brown formatting where PROJECT_DT is in black, even when I manually add back PROJECT_DT to the expression.&amp;nbsp; Maybe the data format is not being recognized as a date to compare against?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. When I apply the INTX_CATEGORY=PROJECT_CATEGORY portion of the expression separately, it evaluates to a count of zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: #0070c0; font-size: 10pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: black; font-size: 10pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: #996633; font-size: 10pt;"&gt;Int_ID&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: black; font-size: 10pt;"&gt;={'*'},&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: #996633; font-size: 10pt;"&gt;INTX_CATEGORY&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: black; font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: #996633; font-size: 10pt;"&gt;PROJECT_CATEGORY&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: black; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: #996633; font-size: 10pt;"&gt;INTX_DATE&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: black; font-size: 10pt;"&gt;={'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; font-size: 10pt;"&gt;&amp;gt;=PROJECT_DT'&lt;SPAN style="color: black;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #0070c0;"&gt;Distinct&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #996633;"&gt;Customer&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2012 19:09:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Multiple-Conditions/m-p/367953#M136840</guid>
      <dc:creator />
      <dc:date>2012-07-25T19:09:22Z</dc:date>
    </item>
  </channel>
</rss>

