<?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 Conditional Textcount in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Conditional-Textcount/m-p/149870#M27982</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe this?&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;count(&lt;STRONG&gt;distinct&lt;/STRONG&gt; if( match(Activity.TYPE,'Email','Telephone Call - Voiceblast','Telephone Call - Voicemail'),Activity.TYPE))&lt;BR /&gt;+ count( if(&lt;STRONG&gt;not&lt;/STRONG&gt; match(Activity.TYPE,'Email','Telephone Call - Voiceblast','Telephone Call - Voicemail'),Activity.TYPE))&lt;/P&gt;&lt;P&gt;Ignoring your filters isn't a bug, because set analysis is designed to be able to ignore filters. In this case, you've specifically told QlikView that you want those three activity types regardless of what activity types are selected. So in your case, you want to stick with something more basic, like an if(). The above expression can be simplified, but I wanted to make clear how similar the two halves were in concept, that the two halves together encompassed the whole set of selected data (match() vs. not match()), and that one was counting only one instance (distinct) and the other was not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Jul 2009 01:34:30 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2009-07-22T01:34:30Z</dc:date>
    <item>
      <title>Conditional Textcount</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Textcount/m-p/149869#M27981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there, I'm trying to do a chart of employees taking part in activities with clients. For some of the activities, such as 'training - one on one' I want to count all the instances of an employee taking part in that activity with a single client. Something like 'e-mail' I want to count only one instance of for each client, no matter how many times they have sent e-mail to that client.&lt;/P&gt;&lt;P&gt;To begin with, I tried to isolate all the activities that I want to only ever show one, and wrote a textcount distinct:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;Textcount(DISTINCT{&amp;lt;Activity.TYPE={'Email','Telephone Call - Voiceblast', 'Telephone Call - Voicemail'}&amp;gt;}Activity.TYPE)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;which sort of works, but now the chart shows all of those activities for the selected client regardless of any filters I try and apply? Is there a way round this? Also, if this is a bug, ignoring it, how would I then go about adding a Sum(Activity.TYPE) for everything else on the end of that?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2009 20:37:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Textcount/m-p/149869#M27981</guid>
      <dc:creator>richnorris</dc:creator>
      <dc:date>2009-07-21T20:37:38Z</dc:date>
    </item>
    <item>
      <title>Conditional Textcount</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Textcount/m-p/149870#M27982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe this?&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;count(&lt;STRONG&gt;distinct&lt;/STRONG&gt; if( match(Activity.TYPE,'Email','Telephone Call - Voiceblast','Telephone Call - Voicemail'),Activity.TYPE))&lt;BR /&gt;+ count( if(&lt;STRONG&gt;not&lt;/STRONG&gt; match(Activity.TYPE,'Email','Telephone Call - Voiceblast','Telephone Call - Voicemail'),Activity.TYPE))&lt;/P&gt;&lt;P&gt;Ignoring your filters isn't a bug, because set analysis is designed to be able to ignore filters. In this case, you've specifically told QlikView that you want those three activity types regardless of what activity types are selected. So in your case, you want to stick with something more basic, like an if(). The above expression can be simplified, but I wanted to make clear how similar the two halves were in concept, that the two halves together encompassed the whole set of selected data (match() vs. not match()), and that one was counting only one instance (distinct) and the other was not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2009 01:34:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Textcount/m-p/149870#M27982</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-07-22T01:34:30Z</dc:date>
    </item>
  </channel>
</rss>

