<?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 only if .. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/998017#M339423</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think Rob's suggestion certainly works. The only easier solution (at least, for one product only) would be to use an Advanced Search on the Customer field and request that the concatenation of all Products equals to the desired product name. For example, something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: terminal, monaco;"&gt;=Count({&amp;lt;CustomerID={"=concat( Distinct ProductType, '|')='Car'"}&lt;/SPAN&gt;&lt;SPAN style="font-family: terminal, monaco; font-style: inherit; font-weight: inherit; line-height: 1.5em;"&gt;&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: terminal, monaco;"&gt;Distinct CustomerID)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: terminal, monaco;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: terminal, monaco;"&gt;For two products, the solution could be a bit more complex - it needs to take into account the specific sorting of the Product Types:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: terminal, monaco;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: terminal, monaco;"&gt;=Count({&amp;lt;CustomerID={"=concat( Distinct ProductType, '|', ProductType)='Car|House'"}&lt;/SPAN&gt;&lt;SPAN style="font-family: terminal, monaco; font-style: inherit; font-weight: inherit;"&gt;&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: terminal, monaco;"&gt;Distinct CustomerID)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: terminal, monaco;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: terminal, monaco;"&gt;Check out my new book &lt;EM&gt;QlikView Your Business&lt;/EM&gt; for advanced examples of using Set Analysis in QlikView.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: terminal, monaco;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: terminal, monaco;"&gt;cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: terminal, monaco;"&gt;Oleg Troyansky&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.amazon.com/gp/product/1118949552/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1118949552&amp;amp;linkCode=as2&amp;amp;tag=natursyner0f-20&amp;amp;linkId=64QJ6MD3O54VZHF7" rel="nofollow"&gt;Check out my new book &lt;EM&gt;QlikView Your Business&lt;/EM&gt;: An expert guide to Business Discovery with QlikView and Qlik Sense&lt;/A&gt;&lt;IMG alt="" border="0" height="1" src="http://ir-na.amazon-adsystem.com/e/ir?t=natursyner0f-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=1118949552" style="border: none !important; margin: 0px !important;" width="1" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Dec 2015 06:53:21 GMT</pubDate>
    <dc:creator>Oleg_Troyansky</dc:creator>
    <dc:date>2015-12-01T06:53:21Z</dc:date>
    <item>
      <title>Count only if ..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/997993#M339399</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;please help, this seems so basic but I still can't figure out how to do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have several customers with a CustomerID. The customers can by certain products, which have a ProductType (e.g. Car, House, Food, etc).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I count the customers, who have bought ONLY(!) a car, and no house, food, etc...?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;The closest I get is this (but I also counts customers which bought a car and a house:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Count({$&amp;lt;ProductType={'Car'}&amp;gt;} Distinct CustomerID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Nov 2015 11:49:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/997993#M339399</guid>
      <dc:creator>nigel987</dc:creator>
      <dc:date>2015-11-27T11:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: Count only if ..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/997994#M339400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;your syntax is ok...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=Count({$&amp;lt;ProductType={'Car'}&amp;gt;} Distinct CustomerID)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;what error you are getting??&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Nov 2015 12:00:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/997994#M339400</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-27T12:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: Count only if ..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/997995#M339401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, there is no error. But it counts all users which ordered a car. I want to count users which ONLY ordered a car, but no other product type, etc. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Nov 2015 12:01:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/997995#M339401</guid>
      <dc:creator>nigel987</dc:creator>
      <dc:date>2015-11-27T12:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: Count only if ..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/997996#M339402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi nihal your syntax is correct,&lt;/P&gt;&lt;P&gt;what error your getting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Untitled.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/107469_Untitled.png" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Nov 2015 12:11:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/997996#M339402</guid>
      <dc:creator />
      <dc:date>2015-11-27T12:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: Count only if ..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/997997#M339403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With this set &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;{$&amp;lt;ProductType={'Car'}&amp;gt;}&lt;/STRONG&gt;&lt;/SPAN&gt;, you would be getting Car only&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Nov 2015 12:15:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/997997#M339403</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-27T12:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: Count only if ..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/997998#M339404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've attached a sample file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Nov 2015 12:21:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/997998#M339404</guid>
      <dc:creator>nigel987</dc:creator>
      <dc:date>2015-11-27T12:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: Count only if ..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/997999#M339405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nihal,&lt;/P&gt;&lt;P&gt;This is a really good question. Try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Concat(DISTINCT {$&amp;lt;[CustomerID] =E({&amp;lt;ProductType -= {'Car'}&amp;gt;})&amp;gt;}[CustomerID],', ')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should give you a concatenated string of all the CustomerIDs who bought only a car. If a customer bought a ProductType of anything other than 'Car' these orders would be captured by the set modifier &lt;SPAN style="font-size: 13.3333px;"&gt;&amp;lt;ProductType -= {'Car'}&amp;gt; and a CustomerID is excluded if an instance of it occurs in this set.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it works!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Nov 2015 12:21:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/997999#M339405</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2015-11-27T12:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: Count only if ..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/998000#M339406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal,monaco;"&gt;=Count({$&amp;lt;ProductType={'Car'}, &lt;SPAN style="color: #0000ff;"&gt;CustomerID={"=Count( Distinct ProductType)=1"}&amp;gt;&lt;/SPAN&gt;} Distinct CustomerID)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Nov 2015 12:31:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/998000#M339406</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-11-27T12:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: Count only if ..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/998001#M339407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nihal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you tell me your expected output?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagarjuna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Nov 2015 12:34:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/998001#M339407</guid>
      <dc:creator>nagarjuna_kotha</dc:creator>
      <dc:date>2015-11-27T12:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Count only if ..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/998002#M339408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nihal,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In my reply I concatenated up the CustomerID, of course you can just count them rather than list them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Nov 2015 12:36:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/998002#M339408</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2015-11-27T12:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: Count only if ..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/998003#M339409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Count({$&amp;lt;CustomerID=E({&amp;lt;ProductType-={'Car'}&amp;gt;}CustomerID), ProductType={'Car'}&amp;gt;} Distinct CustomerID)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Nov 2015 12:44:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/998003#M339409</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-11-27T12:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: Count only if ..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/998004#M339410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrew, Hi Gysbert, &lt;/P&gt;&lt;P&gt;I am currently testing your approaches and they seem promising. &lt;/P&gt;&lt;P&gt;I am just trying to extend your formulas to get in a next step:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count of customers which have only (a car AND a house). &lt;/P&gt;&lt;P&gt;how would I do that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Nov 2015 12:48:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/998004#M339410</guid>
      <dc:creator>nigel987</dc:creator>
      <dc:date>2015-11-27T12:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: Count only if ..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/998005#M339411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nihal,&lt;/P&gt;&lt;P&gt;This thread shows that there are sometimes different ways to approach the logic. My expression gives the same answer as tresesco but the approach differs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tresesco's expression says let's count customers that have bought a car and that have only bought one ProductType.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My expression says count up the customers but first exclude those who have ever bought a ProductType that was not a Car.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The good news is that if one way of approaching a problem has you struggling to write a code or expression then a rethink of the logic behind the question can lead you to writing a solution using functions and set operators you're more comfortable with.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Nov 2015 12:49:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/998005#M339411</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2015-11-27T12:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: Count only if ..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/998006#M339412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: terminal,monaco;"&gt;=Count({$&amp;lt;ProductType={'Car', &lt;SPAN style="color: #ff0000;"&gt;'House'&lt;/SPAN&gt;}, &lt;SPAN style="color: #0000ff;"&gt;CustomerID={"=Count( Distinct ProductType&lt;SPAN style="color: #ff0000;"&gt;)=2&lt;/SPAN&gt;"}&amp;gt;&lt;/SPAN&gt;} Distinct CustomerID)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Check my above reply and compare, you would get the logic I hope.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Nov 2015 12:52:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/998006#M339412</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-11-27T12:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: Count only if ..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/998007#M339413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrew,&lt;/P&gt;&lt;P&gt;thank you for the explanation. I think I better understand the different solutions now and both do not seem to fit. I should have explained the entire problem form the very beginning. What I am trying to do, is to group my users like in a VENN diagram and count the different units.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So something like: (if I have the productType car, house and food)&lt;/P&gt;&lt;P&gt;count users who bought only a car&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;count users who bought only a house&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;count users who bought only food&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;count users who bought only car and house&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;count users who bought only car and food&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;count users who bought only house and food&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;count users who bought car, house and food&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;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Nov 2015 12:56:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/998007#M339413</guid>
      <dc:creator>nigel987</dc:creator>
      <dc:date>2015-11-27T12:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: Count only if ..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/998008#M339414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nihal,&lt;/P&gt;&lt;P&gt;For your revised question the tresesco's expression is much easier to revise to give the answer. His expression now says count customers who have only bought a car or a house but have bought two distinct ProductTypes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For my expression it's much more difficult to state the new logic in words even before rewriting it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Nov 2015 13:06:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/998008#M339414</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2015-11-27T13:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: Count only if ..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/998009#M339415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's what I'm doing. I'm taking each sample and testing the result it delivers. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was just giving Andrew the full picture of the problem. I did NOT expect him to give me the code for each use case in the Venn diagram... if that's what you think.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Nov 2015 13:09:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/998009#M339415</guid>
      <dc:creator>nigel987</dc:creator>
      <dc:date>2015-11-27T13:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: Count only if ..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/998010#M339416</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;thanks to tresescos suggestion I could calculate the following counts:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt; Group with one product only&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;EM&gt;count users who bought only a car&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Count({$&amp;lt;ProductType={'car'},CustomerID={"=Count(Distinct ProductType)=1"}&amp;gt;} Distinct CustomerID)&lt;/P&gt;&lt;P&gt;&lt;EM&gt;count users who bought only a house&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Count({$&amp;lt;ProductType={'house'},CustomerID={"=Count(Distinct ProductType)=1"}&amp;gt;} Distinct CustomerID)&lt;/P&gt;&lt;P&gt;&lt;EM&gt;count users who bought only food&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Count({$&amp;lt;ProductType={'food'},CustomerID={"=Count(Distinct ProductType)=1"}&amp;gt;} Distinct CustomerID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt; Group with all three products&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;EM&gt;count users who bought car, house and food&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Count({$&amp;lt;ProductType={'food','car','house'},CustomerID={"=Count(Distinct ProductType)=3"}&amp;gt;} Distinct CustomerID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt; Group with only two products&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;EM&gt;count users who bought only car and house&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Count({$&amp;lt;ProductType={'Car', 'House'}, CustomerID={"=Count( Distinct ProductType)=2"}&amp;gt;} Distinct CustomerID)&lt;/P&gt;&lt;P&gt;This does not work, as it counts users with two different productTypes, but one of them can be either car or house. So I get those with &lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&amp;nbsp; car and house, &lt;/LI&gt;&lt;LI&gt;&amp;nbsp; car and food,&lt;/LI&gt;&lt;LI&gt;&amp;nbsp; house and food.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know how I can state something like:&lt;/P&gt;&lt;P&gt;count users with two distinct productTypes (CustomerID={"=Count( Distinct ProductType)=2"})&lt;/P&gt;&lt;P&gt;but these product types &lt;STRONG&gt;must&lt;/STRONG&gt; be car and house (and NOT food)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for any advice. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Nov 2015 16:26:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/998010#M339416</guid>
      <dc:creator>nigel987</dc:creator>
      <dc:date>2015-11-30T16:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: Count only if ..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/998011#M339417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nihal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please try with attached qvw&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Nov 2015 18:04:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/998011#M339417</guid>
      <dc:creator>anlonghi2</dc:creator>
      <dc:date>2015-11-30T18:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: Count only if ..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/998012#M339418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nihal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you need counters please look at new qvw version&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Nov 2015 18:20:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-only-if/m-p/998012#M339418</guid>
      <dc:creator>anlonghi2</dc:creator>
      <dc:date>2015-11-30T18:20:34Z</dc:date>
    </item>
  </channel>
</rss>

