<?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 Blacklist implementation in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Blacklist-implementation-in-script/m-p/1049236#M637885</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts,&lt;/P&gt;&lt;P&gt;I need to implement a kind of “blackist” with some logic behind.&lt;/P&gt;&lt;P&gt;I’ve already tried some stuff, but it doesn’t work as required still.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The requirement:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;We have a SalesData table and a Blacklist table.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Screenshot03-Results.png" class="jive-image image-1" height="315" src="https://community.qlik.com/legacyfs/online/117617_Screenshot03-Results.png" style="height: 315px; width: 765.8823529411765px;" width="766" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If a customer is in the blacklist table, we need to check the year &amp;amp; month since he is blacklisted. From that date on all of his records should be removed from the table. It must be done in script, playing with the filters is not an option ; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt;"&gt;E.g.&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;EM&gt;101 John Smith&lt;/EM&gt; &lt;/SPAN&gt;is blacklisted since &lt;STRONG&gt;&lt;EM&gt;02-2015&lt;/EM&gt;&lt;/STRONG&gt;. All records after &lt;EM&gt;&lt;STRONG&gt;02-2015&lt;/STRONG&gt;&lt;/EM&gt; will be removed from the table. Only the record from &lt;EM style="text-decoration: underline;"&gt;01-2015&lt;/EM&gt; will stay, because he was not blacklisted on that date. The customer 105 Joshua Sleedge will be removed, too.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I’ve setup an example with all data already in place, so you can play with it. &lt;/P&gt;&lt;P&gt;In the file “01_HowTo_Blacklist-data_load_only.qvw” the data is just loaded. – nothing to do there&lt;/P&gt;&lt;P&gt;In the file “02_HowTo_Blacklist-data_modelling.qvw” we should remove the blacklisted customers. In the load script, if possible (but without playing with filters)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Nik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Mar 2016 14:03:39 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-03-10T14:03:39Z</dc:date>
    <item>
      <title>Blacklist implementation in script</title>
      <link>https://community.qlik.com/t5/QlikView/Blacklist-implementation-in-script/m-p/1049236#M637885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts,&lt;/P&gt;&lt;P&gt;I need to implement a kind of “blackist” with some logic behind.&lt;/P&gt;&lt;P&gt;I’ve already tried some stuff, but it doesn’t work as required still.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The requirement:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;We have a SalesData table and a Blacklist table.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Screenshot03-Results.png" class="jive-image image-1" height="315" src="https://community.qlik.com/legacyfs/online/117617_Screenshot03-Results.png" style="height: 315px; width: 765.8823529411765px;" width="766" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If a customer is in the blacklist table, we need to check the year &amp;amp; month since he is blacklisted. From that date on all of his records should be removed from the table. It must be done in script, playing with the filters is not an option ; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt;"&gt;E.g.&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;EM&gt;101 John Smith&lt;/EM&gt; &lt;/SPAN&gt;is blacklisted since &lt;STRONG&gt;&lt;EM&gt;02-2015&lt;/EM&gt;&lt;/STRONG&gt;. All records after &lt;EM&gt;&lt;STRONG&gt;02-2015&lt;/STRONG&gt;&lt;/EM&gt; will be removed from the table. Only the record from &lt;EM style="text-decoration: underline;"&gt;01-2015&lt;/EM&gt; will stay, because he was not blacklisted on that date. The customer 105 Joshua Sleedge will be removed, too.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I’ve setup an example with all data already in place, so you can play with it. &lt;/P&gt;&lt;P&gt;In the file “01_HowTo_Blacklist-data_load_only.qvw” the data is just loaded. – nothing to do there&lt;/P&gt;&lt;P&gt;In the file “02_HowTo_Blacklist-data_modelling.qvw” we should remove the blacklisted customers. In the load script, if possible (but without playing with filters)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Nik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 14:03:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Blacklist-implementation-in-script/m-p/1049236#M637885</guid>
      <dc:creator />
      <dc:date>2016-03-10T14:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: Blacklist implementation in script</title>
      <link>https://community.qlik.com/t5/QlikView/Blacklist-implementation-in-script/m-p/1049237#M637886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MAP_blacklist:&lt;/P&gt;&lt;P&gt;MAPPING LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; CustomerID, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //CustomerName, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year&amp;amp;Month as date&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Tab1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;100:&lt;/P&gt;&lt;P&gt;LOAD Team, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CustomerID, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CustomerName, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Category, &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; Year, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Profit,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Applymap('MAP_blacklist',CustomerID, 202012) as dateblacklisted &lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Tab1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;200:&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;RESIDENT 100&lt;/P&gt;&lt;P&gt;WHERE Year&amp;amp;Month &amp;lt; dateblacklisted;&lt;/P&gt;&lt;P&gt;DROP TABLE 100;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Johan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 14:30:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Blacklist-implementation-in-script/m-p/1049237#M637886</guid>
      <dc:creator>puttemans</dc:creator>
      <dc:date>2016-03-10T14:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: Blacklist implementation in script</title>
      <link>https://community.qlik.com/t5/QlikView/Blacklist-implementation-in-script/m-p/1049238#M637887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or maybe using a common key&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD * FROM &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;SalesData;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEFT JOIN (Temp)&lt;/P&gt;&lt;P&gt;LOAD Blacklist_CustomerID as SalesData_CustomerID,&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; Blacklist_Year,&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; Blacklist_Month&lt;/P&gt;&lt;P&gt;FROM &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Blacklist;&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;Result:&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;NOCONCATENATE &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;LOAD * &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;RESIDENT Temp&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;WHERE MakeDate(SalesData_Year,SalesData_Month) &amp;lt; &lt;STRONG&gt;RangeMin&lt;/STRONG&gt;&lt;SPAN style="font-size: 13.33px;"&gt;(MakeDate(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Blacklist&lt;/SPAN&gt;_Year,&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Blacklist&lt;/SPAN&gt;_Month), Today(1));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: RangeMin...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 14:32:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Blacklist-implementation-in-script/m-p/1049238#M637887</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-03-10T14:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Blacklist implementation in script</title>
      <link>https://community.qlik.com/t5/QlikView/Blacklist-implementation-in-script/m-p/1049239#M637888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you very much, Johan.&lt;/P&gt;&lt;P&gt;The answer of swuehl was also helpfull.&lt;/P&gt;&lt;P&gt;I've uploaded the working solution for the community.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 15:56:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Blacklist-implementation-in-script/m-p/1049239#M637888</guid>
      <dc:creator />
      <dc:date>2016-03-10T15:56:35Z</dc:date>
    </item>
  </channel>
</rss>

