<?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 Get a macro to use select excluded in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Get-a-macro-to-use-select-excluded/m-p/178460#M45652</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Thanks for you input.&lt;/P&gt;&lt;P&gt;My problem is that we do have millions of customers and millions of parts.&lt;/P&gt;&lt;P&gt;First of all we have all our orders already in the application that amount to a couple of millions.&lt;/P&gt;&lt;P&gt;Then our marketing department comes with a request that goes something like.&lt;/P&gt;&lt;P&gt;Give me a list of email addresses where the customer has purchased one ot the following products (a list with in extreme cases 10 000 articlenumbers) last year that has not purchased one of the following ( another list with in extreme cases 10 000 articles).&lt;/P&gt;&lt;P&gt;The reason I have created the macro is to get the 2 lists into the application.&lt;BR /&gt;But I have not found a way to get QV to understand that the second list should be applied on all orderrows on the orders from result of the first list.&lt;/P&gt;&lt;P&gt;Any ideás?&lt;/P&gt;&lt;P&gt;By the way, how do you upload files? I could upload my application to show you.&lt;/P&gt;&lt;P&gt;br&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Nov 2010 16:12:38 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-11-10T16:12:38Z</dc:date>
    <item>
      <title>Get a macro to use select excluded</title>
      <link>https://community.qlik.com/t5/QlikView/Get-a-macro-to-use-select-excluded/m-p/178458#M45650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm using QV version 8.2.&lt;/P&gt;&lt;P&gt;I'm trying to create an application where we can select which customers to send newsletters to.&lt;/P&gt;&lt;P&gt;Part of this selection is to check against a number of products the customer must have bought (at least one).&lt;/P&gt;&lt;P&gt;There is also a list of products the customer can not have bought already (normally what the offer is about).&lt;/P&gt;&lt;P&gt;I have created a macro that solves the uploading of the product list.&lt;/P&gt;&lt;P&gt;The code for the macro is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub multySelection_Web_ArtNr_not_bought&lt;BR /&gt; set v = ActiveDocument.GetVariable("vinput_artno_not_bought")&lt;BR /&gt; vinput_artno = v.GetContent.String&lt;BR /&gt; strlength = Len(vinput_artno_not_bought)&lt;BR /&gt; set f = ActiveDocument.Fields("Web_ProductNumber")&lt;BR /&gt; set fv = f.GetNoValues&lt;/P&gt;&lt;P&gt;for i = 0 to strlength +1&lt;BR /&gt; commaF2 = InStrRev(vinput_artno,",")&lt;BR /&gt; inpar = mid(vinput_artno,commaF2 + 1,len(vinput_artno))&lt;BR /&gt; if not IsNumeric(inpar) then&lt;BR /&gt; msgbox("Please use correct format")&lt;BR /&gt; exit for&lt;/P&gt;&lt;P&gt;end if&lt;BR /&gt; fv.Add&lt;BR /&gt; fv(i).Number = inpar&lt;BR /&gt; fv(i).IsNumeric = true&lt;BR /&gt; if not commaF2 = "0" then&lt;BR /&gt; vinput_artno = left(vinput_artno,commaF2-1)&lt;BR /&gt; else&lt;/P&gt;&lt;P&gt;exit for&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;next&lt;/P&gt;&lt;P&gt;f.SelectValues fv&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;My problem is how do I get QV to run the productlist against what a customer has not bought?&lt;/DIV&gt;&lt;DIV&gt;In version 8.5 or later I assume I would be able to use set analysis but is there another way that will work with 8.2?&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Br&lt;/DIV&gt;&lt;DIV&gt;Martin&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Nov 2010 15:14:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-a-macro-to-use-select-excluded/m-p/178458#M45650</guid>
      <dc:creator />
      <dc:date>2010-11-09T15:14:36Z</dc:date>
    </item>
    <item>
      <title>Get a macro to use select excluded</title>
      <link>https://community.qlik.com/t5/QlikView/Get-a-macro-to-use-select-excluded/m-p/178459#M45651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Martin,&lt;/P&gt;&lt;P&gt;Not quite sure what you are trying to do here, but the attached document shows how to find all those parts that customers havent bought.&lt;/P&gt;&lt;P&gt;Its effective if not efficient but as it creates a matrix of all customers/parts then I wouldnt recommend it where you have millions of customers and millions of parts!&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Nov 2010 17:02:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-a-macro-to-use-select-excluded/m-p/178459#M45651</guid>
      <dc:creator />
      <dc:date>2010-11-09T17:02:47Z</dc:date>
    </item>
    <item>
      <title>Get a macro to use select excluded</title>
      <link>https://community.qlik.com/t5/QlikView/Get-a-macro-to-use-select-excluded/m-p/178460#M45652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Thanks for you input.&lt;/P&gt;&lt;P&gt;My problem is that we do have millions of customers and millions of parts.&lt;/P&gt;&lt;P&gt;First of all we have all our orders already in the application that amount to a couple of millions.&lt;/P&gt;&lt;P&gt;Then our marketing department comes with a request that goes something like.&lt;/P&gt;&lt;P&gt;Give me a list of email addresses where the customer has purchased one ot the following products (a list with in extreme cases 10 000 articlenumbers) last year that has not purchased one of the following ( another list with in extreme cases 10 000 articles).&lt;/P&gt;&lt;P&gt;The reason I have created the macro is to get the 2 lists into the application.&lt;BR /&gt;But I have not found a way to get QV to understand that the second list should be applied on all orderrows on the orders from result of the first list.&lt;/P&gt;&lt;P&gt;Any ideás?&lt;/P&gt;&lt;P&gt;By the way, how do you upload files? I could upload my application to show you.&lt;/P&gt;&lt;P&gt;br&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Nov 2010 16:12:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-a-macro-to-use-select-excluded/m-p/178460#M45652</guid>
      <dc:creator />
      <dc:date>2010-11-10T16:12:38Z</dc:date>
    </item>
    <item>
      <title>Get a macro to use select excluded</title>
      <link>https://community.qlik.com/t5/QlikView/Get-a-macro-to-use-select-excluded/m-p/178461#M45653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I read this earlier in teh QV Ref manual which intrigues me and may help:&lt;/P&gt;&lt;P&gt;sum( {$&amp;lt;Customer = E({1&amp;lt;Product={'Shoe'}&amp;gt;})&amp;gt;} Sales)&lt;BR /&gt;returns the sales for current selection, but only those customers&lt;BR /&gt;that never bought the product 'Shoe'. The element&lt;BR /&gt;function E( ) here returns the list of excluded customers;&lt;BR /&gt;those that are excluded by the selection 'Shoe' in the field&lt;BR /&gt;Product.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;P&gt;PS You can upload using the 'Options' tab when replying to a post&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Nov 2010 16:47:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-a-macro-to-use-select-excluded/m-p/178461#M45653</guid>
      <dc:creator />
      <dc:date>2010-11-10T16:47:36Z</dc:date>
    </item>
  </channel>
</rss>

