<?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: Problem with duplicate data in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-duplicate-data/m-p/755431#M269005</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe because they exist for both companies? Check your data, because we cannot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Dec 2014 19:52:00 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2014-12-17T19:52:00Z</dc:date>
    <item>
      <title>Problem with duplicate data</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-duplicate-data/m-p/755430#M269004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure why I am getting duplicate data but I suspect it has something to do with my load process.&lt;/P&gt;&lt;P&gt;I have an asset table which lists all assets.&amp;nbsp; There is only one assetId for each asset.&lt;/P&gt;&lt;P&gt;I also have a book_parts table that contains assetId &amp;amp; sequence.&amp;nbsp; There could be multiple sequences for the same asset. &lt;/P&gt;&lt;P&gt;I need to load the book_parts table and look at the contents to create a new table and then merge that with the asset table.&lt;/P&gt;&lt;P&gt;If the book_parts table has multiple sequences for the same asset then it must eliminate the sequence that is 0 and pull the others but if there is only a sequence 0 then it just needs to keep that.&lt;/P&gt;&lt;P&gt;When I try to create a pivot or straight table it looks like the assetId &amp;amp; sequence is listed twice like there is another table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my load info:&lt;/P&gt;&lt;P&gt;assets:&lt;/P&gt;&lt;P&gt;LOAD CompanyID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 630 as Parent_Comp,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AssetID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Description,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AcquisitionDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(AcquisitionDate) as Fiscal_Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(AcquisitionDate) as Fiscal_Period,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(IsInactive='F','Active','Inactive') as Status,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ReplaceValCat;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM Asset&lt;/P&gt;&lt;P&gt;where CompanyID=2 and&lt;/P&gt;&lt;P&gt;(AssetGL&amp;lt;&amp;gt;00000877 or AssetGL&amp;lt;&amp;gt;00000949 or AssetGL&amp;lt;&amp;gt;00000954 or AssetGL&amp;lt;&amp;gt;00000955);&lt;/P&gt;&lt;P&gt;Concatenate&lt;/P&gt;&lt;P&gt;LOAD CompanyID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 670 as Parent_Comp,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AssetID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Description,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AcquisitionDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(AcquisitionDate) as Fiscal_Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(AcquisitionDate) as Fiscal_Period,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(IsInactive='F','Active','Inactive') as Status,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ReplaceValCat;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM Asset&lt;/P&gt;&lt;P&gt;where CompanyID=3;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;book_parts1:&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;LOAD CompanyID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AssetID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CompanyID &amp;amp; '-' &amp;amp; AssetID as NewField,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sequence,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; BookID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PlaceServ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AcqValue;&lt;/P&gt;&lt;P&gt;SQL SELECT CompanyID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AssetID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sequence,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; BookID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PlaceServ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AcqValue&lt;/P&gt;&lt;P&gt;FROM BookParts&lt;/P&gt;&lt;P&gt;where BookID=1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;book_parts:&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;LOAD * Resident&lt;/P&gt;&lt;P&gt;book_parts1 &lt;/P&gt;&lt;P&gt;where not (Sequence=0 and NewField=Peek(NewField))&lt;/P&gt;&lt;P&gt;order by CompanyID, AssetID, Sequence desc;&lt;/P&gt;&lt;P&gt;DROP Table book_parts1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left join(assets)&lt;/P&gt;&lt;P&gt;LOAD * Resident&lt;/P&gt;&lt;P&gt;book_parts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's how my data looks in the table:&lt;/P&gt;&lt;P&gt;Why does it have the asset &amp;amp; sequence listed twice????????&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/73701_pastedImage_7.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 15:51:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-duplicate-data/m-p/755430#M269004</guid>
      <dc:creator />
      <dc:date>2014-12-17T15:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with duplicate data</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-duplicate-data/m-p/755431#M269005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe because they exist for both companies? Check your data, because we cannot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 19:52:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-duplicate-data/m-p/755431#M269005</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-12-17T19:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with duplicate data</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-duplicate-data/m-p/755432#M269006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This assetid is only in one company.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 20:43:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-duplicate-data/m-p/755432#M269006</guid>
      <dc:creator />
      <dc:date>2014-12-17T20:43:09Z</dc:date>
    </item>
  </channel>
</rss>

