<?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: Products Never Bought By a Customer in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Products-Never-Bought-By-a-Customer/m-p/109018#M7470</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works fine except for one big issue. If I select a Product from "Product" field I get the correct Product Category and Product&amp;nbsp; Sub Category , and&amp;nbsp; it selects every possible Product from "ProductNotSold" field .&amp;nbsp; It should be giving me the same Product from the "ProductNotSold" field&amp;nbsp; what I select from the Product field. &lt;/P&gt;&lt;P&gt;Please let me know if we can fix this. Please see the attached screen shot for the issue&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 09 Sep 2018 18:48:57 GMT</pubDate>
    <dc:creator>azmeerrehan</dc:creator>
    <dc:date>2018-09-09T18:48:57Z</dc:date>
    <item>
      <title>Products Never Bought By a Customer</title>
      <link>https://community.qlik.com/t5/App-Development/Products-Never-Bought-By-a-Customer/m-p/109016#M7468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;I have attached&amp;nbsp; the sample qvw with the Data Model and the 2 Sample Excel Files. I have a Sales table and Product Table. They are linked by the Inv Date and Order Number. I want to find out for each customer which Product they never bought. SO Basically I am looking for a straight table with Customer name, Product they never bought, Product Cat and Product Sub Category. &lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Please be aware that my data set is huge and cant do any Aggregation on the front end. Ideally would like to generate a field call "Products Not Bought" in the script.&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Please let me know if anyone has a solution for this issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Sep 2018 00:07:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Products-Never-Bought-By-a-Customer/m-p/109016#M7468</guid>
      <dc:creator>azmeerrehan</dc:creator>
      <dc:date>2018-09-09T00:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: Products Never Bought By a Customer</title>
      <link>https://community.qlik.com/t5/App-Development/Products-Never-Bought-By-a-Customer/m-p/109017#M7469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;have a look at the attach example &lt;/P&gt;&lt;P&gt;hope it's helps you &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Sep 2018 14:14:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Products-Never-Bought-By-a-Customer/m-p/109017#M7469</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2018-09-09T14:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: Products Never Bought By a Customer</title>
      <link>https://community.qlik.com/t5/App-Development/Products-Never-Bought-By-a-Customer/m-p/109018#M7470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works fine except for one big issue. If I select a Product from "Product" field I get the correct Product Category and Product&amp;nbsp; Sub Category , and&amp;nbsp; it selects every possible Product from "ProductNotSold" field .&amp;nbsp; It should be giving me the same Product from the "ProductNotSold" field&amp;nbsp; what I select from the Product field. &lt;/P&gt;&lt;P&gt;Please let me know if we can fix this. Please see the attached screen shot for the issue&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Sep 2018 18:48:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Products-Never-Bought-By-a-Customer/m-p/109018#M7470</guid>
      <dc:creator>azmeerrehan</dc:creator>
      <dc:date>2018-09-09T18:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: Products Never Bought By a Customer</title>
      <link>https://community.qlik.com/t5/App-Development/Products-Never-Bought-By-a-Customer/m-p/109019#M7471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;you can connect to table of products not bought either by customer like in the example &lt;/P&gt;&lt;P&gt;or by product that will answer your question &lt;/P&gt;&lt;P&gt;but you can't connect it by both of them unless you'll have both product and customer in the same table &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2018 13:00:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Products-Never-Bought-By-a-Customer/m-p/109019#M7471</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2018-09-10T13:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: Products Never Bought By a Customer</title>
      <link>https://community.qlik.com/t5/App-Development/Products-Never-Bought-By-a-Customer/m-p/109020#M7472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;//Hi, see below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Sales table is useless, if you need customer_name you may use applymap:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sales:&lt;/P&gt;&lt;P&gt;LOAD Cust_Code, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(Inv_Date) as Year, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Inv_Date &amp;amp; '|' &amp;amp; Order_Number as Key, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Order_Number,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Inv_Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cust_Name&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[Sales_Sample.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;map_custumer:&lt;/P&gt;&lt;P&gt;mapping load&lt;/P&gt;&lt;P&gt;Key, Cust_Name resident Sales;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//and then drop sales table... in this way you have only one fact table&lt;/P&gt;&lt;P&gt;Drop Table Sales;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fact_Table:&lt;/P&gt;&lt;P&gt;LOAD ApplyMap('map_custumer', Inv_Date &amp;amp; '|' &amp;amp; Order_Number, '') as Cust_Name,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cust_Code, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Inv_Date &amp;amp; '|' &amp;amp; Order_Number as Key, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text(Cust_Code)&amp;amp;text(Product) as Key2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(Inv_Date) as Year, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product_Cat, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product_Sub_Cat, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[Item_Sample.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//find the possible pairs of product-customer like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NeverBoughtW:&lt;/P&gt;&lt;P&gt;load distinct &lt;/P&gt;&lt;P&gt;text(Product) as ProductW&lt;/P&gt;&lt;P&gt;resident Fact_Table;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;join&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load distinct &lt;/P&gt;&lt;P&gt;text(Cust_Code) as Cust_CodeW resident Fact_Table;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//then map bought ones&lt;/P&gt;&lt;P&gt;map_bought:&lt;/P&gt;&lt;P&gt;Mapping load&lt;/P&gt;&lt;P&gt;text(Cust_Code)&amp;amp;text(Product), 'Y' resident Fact_Table;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//here you have the list of never bought and bought codes&lt;/P&gt;&lt;P&gt;Items:&lt;/P&gt;&lt;P&gt;load &lt;/P&gt;&lt;P&gt;text(Cust_CodeW)&amp;amp;text(ProductW) as Key2,&lt;/P&gt;&lt;P&gt;ProductW, &lt;/P&gt;&lt;P&gt;Cust_CodeW,&lt;/P&gt;&lt;P&gt;Applymap('map_bought', text(Cust_CodeW)&amp;amp;text(ProductW), 'N') as Bought? &lt;/P&gt;&lt;P&gt;resident&amp;nbsp; NeverBoughtW;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop table NeverBoughtW;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2018 14:18:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Products-Never-Bought-By-a-Customer/m-p/109020#M7472</guid>
      <dc:creator>captain89</dc:creator>
      <dc:date>2018-09-10T14:18:48Z</dc:date>
    </item>
  </channel>
</rss>

