<?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: Return count of records in two categories by another dimension in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Return-count-of-records-in-two-categories-by-another-dimension/m-p/2115017#M91000</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/167939"&gt;@Gerhard&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Maybe this:&lt;/P&gt;
&lt;P&gt;=Count( {&amp;lt; Customer = {"=count( {&amp;lt; Order_Number = {'1'} &amp;gt;} distinct Order_Number)&amp;gt;0"} * {"=count( {&amp;lt; Order_Number = {'2'} &amp;gt;} distinct Order_Number)&amp;gt;0"} &amp;gt;} distinct Customer )&lt;/P&gt;
&lt;P&gt;I hope it can helps.&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
    <pubDate>Fri, 08 Sep 2023 13:52:16 GMT</pubDate>
    <dc:creator>agigliotti</dc:creator>
    <dc:date>2023-09-08T13:52:16Z</dc:date>
    <item>
      <title>Return count of records in two categories by another dimension</title>
      <link>https://community.qlik.com/t5/App-Development/Return-count-of-records-in-two-categories-by-another-dimension/m-p/2114937#M90996</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have this data. using set analysis I want to count how many customers purchased product A in Order_Number 1 AND 2.&lt;/P&gt;
&lt;P&gt;load * Inline [&lt;BR /&gt;Customer,Order_Number,Product&lt;BR /&gt;101,1,A&lt;BR /&gt;101,1,B&lt;BR /&gt;102,1,B&lt;BR /&gt;103,1,B&lt;BR /&gt;101,2,A&lt;BR /&gt;102,2,A&lt;BR /&gt;104,1,A];&lt;/P&gt;
&lt;P&gt;I then want to display it in a table by product dimension.&lt;/P&gt;
&lt;P&gt;Product|Count of customers&lt;/P&gt;
&lt;P&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 1&lt;/P&gt;
&lt;P&gt;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |0&lt;/P&gt;
&lt;P&gt;I tried using intersection for the AND piece, but the problem this returns how many customers ordered in Order_Number 1 and 2. Irrelevant of the product.&lt;/P&gt;
&lt;P&gt;Count(distinct{&amp;lt;Product={"=Count(distinct{&amp;lt;Order_Number={'1'}&amp;gt;}Order_Number)"}&amp;gt;*&amp;lt;Product={"=Count(distinct{&amp;lt;Order_Number={'2'}&amp;gt;} Order_Number)"}&amp;gt;} Customer)&lt;/P&gt;
&lt;P&gt;Any help would be appreciated.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Gerhard&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 10:53:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Return-count-of-records-in-two-categories-by-another-dimension/m-p/2114937#M90996</guid>
      <dc:creator>Gerhard</dc:creator>
      <dc:date>2023-09-08T10:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Return count of records in two categories by another dimension</title>
      <link>https://community.qlik.com/t5/App-Development/Return-count-of-records-in-two-categories-by-another-dimension/m-p/2115017#M91000</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/167939"&gt;@Gerhard&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Maybe this:&lt;/P&gt;
&lt;P&gt;=Count( {&amp;lt; Customer = {"=count( {&amp;lt; Order_Number = {'1'} &amp;gt;} distinct Order_Number)&amp;gt;0"} * {"=count( {&amp;lt; Order_Number = {'2'} &amp;gt;} distinct Order_Number)&amp;gt;0"} &amp;gt;} distinct Customer )&lt;/P&gt;
&lt;P&gt;I hope it can helps.&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 13:52:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Return-count-of-records-in-two-categories-by-another-dimension/m-p/2115017#M91000</guid>
      <dc:creator>agigliotti</dc:creator>
      <dc:date>2023-09-08T13:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Return count of records in two categories by another dimension</title>
      <link>https://community.qlik.com/t5/App-Development/Return-count-of-records-in-two-categories-by-another-dimension/m-p/2115033#M91001</link>
      <description>&lt;P&gt;Thanks for the reply, unfortunately the suggestion does not make a difference.&lt;/P&gt;
&lt;P&gt;We do now have a solution as below, not set analysis but rather in the script.&lt;/P&gt;
&lt;P&gt;Table1:&lt;BR /&gt;load * Inline [&lt;BR /&gt;Customer,Order_Number,Product&lt;BR /&gt;101,1,A&lt;BR /&gt;101,1,B&lt;BR /&gt;102,1,B&lt;BR /&gt;103,1,B&lt;BR /&gt;103,2,B&lt;BR /&gt;101,2,A&lt;BR /&gt;102,2,A&lt;BR /&gt;104,1,A&lt;BR /&gt;104,2,A]&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Customers:&lt;BR /&gt;LOAD Count(Customer&amp;amp;Product) As CustomerCount,&lt;BR /&gt;Product,&lt;BR /&gt;Customer&lt;BR /&gt;Resident Table1&lt;BR /&gt;Group By Product,Customer;&lt;BR /&gt;Drop Table Table1;&lt;BR /&gt;Exit Script&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Gerhard_0-1694182719613.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/115908iD060C3EAB7ED9500/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Gerhard_0-1694182719613.png" alt="Gerhard_0-1694182719613.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 14:19:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Return-count-of-records-in-two-categories-by-another-dimension/m-p/2115033#M91001</guid>
      <dc:creator>Gerhard</dc:creator>
      <dc:date>2023-09-08T14:19:24Z</dc:date>
    </item>
  </channel>
</rss>

