<?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: Handling the rejections while loading the data. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Handling-the-rejections-while-loading-the-data/m-p/483141#M1146055</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the example I wrote, I created a resident table called SalesFact_Aux (just for making it more clear). Watch out not to skip that step:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SalesFact_Aux:&lt;/P&gt;&lt;P&gt;NoConcatenate LOAD*&lt;/P&gt;&lt;P&gt;Resident SalesFact;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop table SalesFact;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could of course do the left joins directly to your SalesFact table..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Aug 2013 08:03:37 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-08-12T08:03:37Z</dc:date>
    <item>
      <title>Handling the rejections while loading the data.</title>
      <link>https://community.qlik.com/t5/QlikView/Handling-the-rejections-while-loading-the-data/m-p/483138#M1146052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Finding this bit tricky.. &lt;SPAN style="font-size: 10pt;"&gt;Can someone pl help on this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I need to capture the missing ProductID and the customerIDs while loading the data into SalesFact. Need to load the data only when the CustID and ProductID are there in the customer &amp;amp; Product tables. Also, I need to reject those custID, ProductID which are not there in the customer &amp;amp; Product tables&lt;/P&gt;&lt;P&gt;to an error table ... This is just an example, in my case, I need to lookup almost 6 tables (Product, customer etc.,) and perform rejection &lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Customer:&lt;/P&gt;&lt;P&gt; Load * Inline [&lt;/P&gt;&lt;P&gt; CustID,Custname,Address &lt;/P&gt;&lt;P&gt; 10,'Subash',Indra Nagar &lt;/P&gt;&lt;P&gt; 11,'Ashok',Chromepet ];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SalesFact:&lt;/P&gt;&lt;P&gt; Load * Inline [ &lt;/P&gt;&lt;P&gt; InvID,ProductID,CustomerID,SalesrepID,ShipperID,Sales,Margin&lt;/P&gt;&lt;P&gt; 1,10,10,AA1,SH1,25800,40 &lt;/P&gt;&lt;P&gt; 2,11,10,AA1,SH1,15800,40 &lt;/P&gt;&lt;P&gt; 3,16,10,AA1,SH2,25800,40&lt;/P&gt;&lt;P&gt; 4,15,12,AA1,SH2,25800,40 ];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Product:&lt;/P&gt;&lt;P&gt; Load * Inline &lt;/P&gt;&lt;P&gt; [&lt;/P&gt;&lt;P&gt; ProductID,ProdName,Price&lt;/P&gt;&lt;P&gt; 10,P1,100&lt;/P&gt;&lt;P&gt; 12,P2,150&lt;/P&gt;&lt;P&gt; ];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 06:27:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Handling-the-rejections-while-loading-the-data/m-p/483138#M1146052</guid>
      <dc:creator />
      <dc:date>2013-08-12T06:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: Handling the rejections while loading the data.</title>
      <link>https://community.qlik.com/t5/QlikView/Handling-the-rejections-while-loading-the-data/m-p/483139#M1146053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the easiest way would be to join the three tables with a left join:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SalesFact_Aux:&lt;/P&gt;&lt;P&gt;load*&lt;/P&gt;&lt;P&gt;Resident SalesFact;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop table SalesFact;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join (SalesFact_Aux)&lt;/P&gt;&lt;P&gt;load*&lt;/P&gt;&lt;P&gt;Resident Customer;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table Customer;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join (Sales_Aux)&lt;/P&gt;&lt;P&gt;load*&lt;/P&gt;&lt;P&gt;Resident Product;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table Product;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you have everything in one table, you could create two tables from here. One with the sales that do have a existing customer and product:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sales:&lt;/P&gt;&lt;P&gt;Load*&lt;/P&gt;&lt;P&gt;Resident SalesFact_Aux&lt;/P&gt;&lt;P&gt;where not(isNull(Custname) or isNull(ProdName));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And other table with the errors (just the opposite where clause):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sales_Error:&lt;/P&gt;&lt;P&gt;Load*&lt;/P&gt;&lt;P&gt;Resident SalesFact_Aux&lt;/P&gt;&lt;P&gt;where (isNull(Custname) or isNull(ProdName));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 06:39:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Handling-the-rejections-while-loading-the-data/m-p/483139#M1146053</guid>
      <dc:creator />
      <dc:date>2013-08-12T06:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: Handling the rejections while loading the data.</title>
      <link>https://community.qlik.com/t5/QlikView/Handling-the-rejections-while-loading-the-data/m-p/483140#M1146054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Losu.&amp;nbsp; Can't we do left join on a resident table ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am getting an error "Table not found (SalesFact_Aux)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 07:59:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Handling-the-rejections-while-loading-the-data/m-p/483140#M1146054</guid>
      <dc:creator />
      <dc:date>2013-08-12T07:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: Handling the rejections while loading the data.</title>
      <link>https://community.qlik.com/t5/QlikView/Handling-the-rejections-while-loading-the-data/m-p/483141#M1146055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the example I wrote, I created a resident table called SalesFact_Aux (just for making it more clear). Watch out not to skip that step:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SalesFact_Aux:&lt;/P&gt;&lt;P&gt;NoConcatenate LOAD*&lt;/P&gt;&lt;P&gt;Resident SalesFact;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop table SalesFact;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could of course do the left joins directly to your SalesFact table..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 08:03:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Handling-the-rejections-while-loading-the-data/m-p/483141#M1146055</guid>
      <dc:creator />
      <dc:date>2013-08-12T08:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Handling the rejections while loading the data.</title>
      <link>https://community.qlik.com/t5/QlikView/Handling-the-rejections-while-loading-the-data/m-p/483142#M1146056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Losu , its working fine as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to have these set of errored records to populated in my SalesFact table as well by having '&lt;STRONG&gt;unknown'&amp;nbsp; &lt;/STRONG&gt;value populated for those missing records&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 08:10:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Handling-the-rejections-while-loading-the-data/m-p/483142#M1146056</guid>
      <dc:creator />
      <dc:date>2013-08-12T08:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Handling the rejections while loading the data.</title>
      <link>https://community.qlik.com/t5/QlikView/Handling-the-rejections-while-loading-the-data/m-p/483143#M1146057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok. If you want the errored values also in the SalesFact table, you should reload the SalesFact_Aux table and mark the missing values:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SalesFact:&lt;/P&gt;&lt;P&gt;Noconcatenate LOAD*,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(IsNull(Custname) or IsNull(ProdName), 'Unknown') as isMissingValue&lt;/P&gt;&lt;P&gt;Resident SalesFact_Aux;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table SalesFact_Aux;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That way you will have all the sales and you will be able to select only the errored ones or the correct ones. Works for you that way?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 08:16:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Handling-the-rejections-while-loading-the-data/m-p/483143#M1146057</guid>
      <dc:creator />
      <dc:date>2013-08-12T08:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: Handling the rejections while loading the data.</title>
      <link>https://community.qlik.com/t5/QlikView/Handling-the-rejections-while-loading-the-data/m-p/483144#M1146058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;there are 2 issues &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Now all the records are getting loaded in the Salefact table but its getting duplicated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProductID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&lt;/P&gt;&lt;P&gt;2. If(Isnull(ProductID),'Missing',ProductID)&amp;nbsp; --- It puts all the Productid as 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pl help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 08:28:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Handling-the-rejections-while-loading-the-data/m-p/483144#M1146058</guid>
      <dc:creator />
      <dc:date>2013-08-12T08:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Handling the rejections while loading the data.</title>
      <link>https://community.qlik.com/t5/QlikView/Handling-the-rejections-while-loading-the-data/m-p/483145#M1146059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See the attached example. Is that what you want?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 08:52:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Handling-the-rejections-while-loading-the-data/m-p/483145#M1146059</guid>
      <dc:creator />
      <dc:date>2013-08-12T08:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Handling the rejections while loading the data.</title>
      <link>https://community.qlik.com/t5/QlikView/Handling-the-rejections-while-loading-the-data/m-p/483146#M1146060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Losu.. I couldn't open the qvw's created by others.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate if you could copy/paste the code here..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 09:12:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Handling-the-rejections-while-loading-the-data/m-p/483146#M1146060</guid>
      <dc:creator />
      <dc:date>2013-08-12T09:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: Handling the rejections while loading the data.</title>
      <link>https://community.qlik.com/t5/QlikView/Handling-the-rejections-while-loading-the-data/m-p/483147#M1146061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="xml" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13762987777521353" jivemacro_uid="_13762987777521353"&gt;&lt;P&gt;// First step, we join the tables:&lt;/P&gt;&lt;P&gt;Left Join (SalesFact)&lt;/P&gt;&lt;P&gt;LOAD*&lt;/P&gt;&lt;P&gt;Resident Product;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table Product;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left Join (SalesFact)&lt;/P&gt;&lt;P&gt;LOAD*&lt;/P&gt;&lt;P&gt;Resident Customer;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table Customer;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Here we create a new field to mark the errored values:&lt;/P&gt;&lt;P&gt;Left Join (SalesFact)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; InvID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(IsNull(ProdName) or IsNull(Custname), 'unknown', 'correct') as isMissingValue&lt;/P&gt;&lt;P&gt;Resident SalesFact;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you use set analysis to select correct or incorrect invoices:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;isMissingValue={'unknown'}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="45325" class="jive-image-thumbnail jive-image" onclick="" alt="exaple.png" src="https://community.qlik.com/legacyfs/online/45325_exaple.png" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 09:16:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Handling-the-rejections-while-loading-the-data/m-p/483147#M1146061</guid>
      <dc:creator />
      <dc:date>2013-08-12T09:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Handling the rejections while loading the data.</title>
      <link>https://community.qlik.com/t5/QlikView/Handling-the-rejections-while-loading-the-data/m-p/483148#M1146062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Losu...Its working fine now&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 09:26:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Handling-the-rejections-while-loading-the-data/m-p/483148#M1146062</guid>
      <dc:creator />
      <dc:date>2013-08-12T09:26:07Z</dc:date>
    </item>
  </channel>
</rss>

