<?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: Counting customers who bought bundles in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Counting-customers-who-bought-bundles/m-p/1884407#M72845</link>
    <description>&lt;P&gt;Hi, i may have thought it over and it looks not quite smart, but its my first straight forward attempt and it results in the desired outcome when i grapsed everything correctly:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;bundle1Invoice:
Load
Invoice_ID,
Qty 	as Qty_HZJFNNZH
Resident Invoice
where Match(Product_ID,'HZJFNNZH');

left join(bundle1Invoice)
Load
Invoice_ID,
Qty 	as Qty_QHUXWGTW
Resident Invoice
where Match(Product_ID,'QHUXWGTW');

ConditionedInvoice_MAP:
mapping Load 
	Invoice_ID,
	1
Resident bundle1Invoice
where Qty_HZJFNNZH &amp;gt;= 5
  and Qty_QHUXWGTW &amp;gt;= 10 // if u use "or"/"and "depends on if you want both products in one invoice or either
;

//comment out to see the interim results
drop table bundle1Invoice; 

Customer_Flags:
Load distinct
	Customer_ID,
    ApplyMap('ConditionedInvoice_MAP',Invoice_ID,0)	as bundle1_flag
resident Invoice;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp; &lt;/P&gt;</description>
    <pubDate>Mon, 24 Jan 2022 11:09:57 GMT</pubDate>
    <dc:creator>chris_djih</dc:creator>
    <dc:date>2022-01-24T11:09:57Z</dc:date>
    <item>
      <title>Counting customers who bought bundles</title>
      <link>https://community.qlik.com/t5/App-Development/Counting-customers-who-bought-bundles/m-p/1883848#M72785</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="pl" data-phrase-index="0" data-number-of-phrases="1"&gt;&lt;SPAN&gt;I come to you with a request to suggest an idea for solving the problem.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="pl" data-phrase-index="0" data-number-of-phrases="2"&gt;&lt;SPAN&gt;I have a sales table as in the attachment.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="pl" data-phrase-index="1" data-number-of-phrases="2"&gt;&lt;SPAN&gt;It has more data, of course, but this is what it looks like.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="pl" data-phrase-index="1" data-number-of-phrases="2"&gt;&lt;SPAN&gt;How (at the load editor level) to mark customers who have bought on &lt;STRONG&gt;ONE INVOICE&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="pl" data-phrase-index="1" data-number-of-phrases="2"&gt;&lt;SPAN&gt; - a selected set of products (e.g. 'HZJFNNZH' and 'QHUXWGTW'), &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="pl" data-phrase-index="1" data-number-of-phrases="2"&gt;&lt;SPAN&gt;- minimum x pieces (where x is also fixed), eg. 'HZJFNNZH'&amp;gt; = 5 and 'QHUXWGTW'&amp;gt; = 10. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="pl" data-phrase-index="1" data-number-of-phrases="2"&gt;&lt;SPAN&gt;Of course, there may also be other products on the invoice. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="pl" data-phrase-index="1" data-number-of-phrases="2"&gt;&lt;SPAN&gt;Thanks for any suggestions! &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 12:05:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Counting-customers-who-bought-bundles/m-p/1883848#M72785</guid>
      <dc:creator>qlikeers</dc:creator>
      <dc:date>2022-01-21T12:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: Counting customers who bought bundles</title>
      <link>https://community.qlik.com/t5/App-Development/Counting-customers-who-bought-bundles/m-p/1883891#M72790</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Try with this :&lt;/P&gt;
&lt;P&gt;Count({$&amp;lt;Customer_ID={"=Count(distinct Product_ID)&amp;gt;1"}&amp;gt;} distinct Customer_ID )&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vikasmahajan_0-1642771498066.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/70711iE4DBF01A86D9B851/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vikasmahajan_0-1642771498066.png" alt="vikasmahajan_0-1642771498066.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Hope this help you.&lt;/P&gt;
&lt;P&gt;Vikas&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 13:26:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Counting-customers-who-bought-bundles/m-p/1883891#M72790</guid>
      <dc:creator>vikasmahajan</dc:creator>
      <dc:date>2022-01-21T13:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: Counting customers who bought bundles</title>
      <link>https://community.qlik.com/t5/App-Development/Counting-customers-who-bought-bundles/m-p/1883967#M72796</link>
      <description>&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-MVP lia-component-message-view-widget-author-username"&gt; &lt;A id="link_14" class="lia-link-navigation lia-page-link lia-user-name-link" style="color: #ff9900;" href="https://community.qlik.com/t5/user/viewprofilepage/user-id/41099" target="_self" aria-label="View Profile of vikasmahajan" aria-describedby="userProfileCard-41099"&gt;&lt;SPAN class="login-bold"&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/41099"&gt;@vikasmahajan&lt;/a&gt; &lt;/SPAN&gt;&lt;/A&gt;, thanks for Your answer. &lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="pl" data-phrase-index="0" data-number-of-phrases="1"&gt;&lt;SPAN&gt;But it seems to me that we did not understand each other.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;But it seems to me that we did not understand each other.&lt;BR /&gt;My problem is rather more complicated.&lt;/P&gt;
&lt;P&gt;I need to mark those customers who meet these two conditions together on one invoice. The list of products and the minimum quantity is defined as a parameter.&lt;/P&gt;
&lt;P&gt;And one more important thing - I have to do this (as I wrote above) from the load script.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 15:43:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Counting-customers-who-bought-bundles/m-p/1883967#M72796</guid>
      <dc:creator>qlikeers</dc:creator>
      <dc:date>2022-01-21T15:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: Counting customers who bought bundles</title>
      <link>https://community.qlik.com/t5/App-Development/Counting-customers-who-bought-bundles/m-p/1884407#M72845</link>
      <description>&lt;P&gt;Hi, i may have thought it over and it looks not quite smart, but its my first straight forward attempt and it results in the desired outcome when i grapsed everything correctly:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;bundle1Invoice:
Load
Invoice_ID,
Qty 	as Qty_HZJFNNZH
Resident Invoice
where Match(Product_ID,'HZJFNNZH');

left join(bundle1Invoice)
Load
Invoice_ID,
Qty 	as Qty_QHUXWGTW
Resident Invoice
where Match(Product_ID,'QHUXWGTW');

ConditionedInvoice_MAP:
mapping Load 
	Invoice_ID,
	1
Resident bundle1Invoice
where Qty_HZJFNNZH &amp;gt;= 5
  and Qty_QHUXWGTW &amp;gt;= 10 // if u use "or"/"and "depends on if you want both products in one invoice or either
;

//comment out to see the interim results
drop table bundle1Invoice; 

Customer_Flags:
Load distinct
	Customer_ID,
    ApplyMap('ConditionedInvoice_MAP',Invoice_ID,0)	as bundle1_flag
resident Invoice;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp; &lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 11:09:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Counting-customers-who-bought-bundles/m-p/1884407#M72845</guid>
      <dc:creator>chris_djih</dc:creator>
      <dc:date>2022-01-24T11:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Counting customers who bought bundles</title>
      <link>https://community.qlik.com/t5/App-Development/Counting-customers-who-bought-bundles/m-p/1887097#M73093</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/151946"&gt;@chris_djih&lt;/a&gt; good idea! Looks nice. &lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="pl" data-phrase-index="0" data-number-of-phrases="1"&gt;&lt;SPAN&gt;I will try to test it!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 13:50:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Counting-customers-who-bought-bundles/m-p/1887097#M73093</guid>
      <dc:creator>qlikeers</dc:creator>
      <dc:date>2022-01-31T13:50:44Z</dc:date>
    </item>
  </channel>
</rss>

