<?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: 2 similar file comparison in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/2-similar-file-comparison/m-p/1742927#M453077</link>
    <description>&lt;P&gt;Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;File1:
LOAD * INLINE [
    ID, Name, Age
    1, General, 20
    2, abe, 30
    3, general, 40
];

File2:
NoConcatenate
LOAD * INLINE [
    ID, Name, Age
    1, Joe, 21
    2, abe, 30
    3, sam, 41
];

Left Join (File2)
LOAD ID,
	 Name as NameTmp,
	 Age as File1Age
Resident File1;

DROP Table File1;

FinalTable:
LOAD ID,
	 If(WildMatch(NameTmp, 'general'), Name, NameTmp) as Name,
	 File1Age,
	 Age as File2Age
Resident File2;

DROP Table File2;&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 10 Sep 2020 16:33:15 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2020-09-10T16:33:15Z</dc:date>
    <item>
      <title>2 similar file comparison</title>
      <link>https://community.qlik.com/t5/QlikView/2-similar-file-comparison/m-p/1742916#M453076</link>
      <description>&lt;P&gt;I have 2 excel files as follows&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;File 1&lt;/P&gt;&lt;P&gt;ID, Name, Age&lt;/P&gt;&lt;P&gt;1, General, 20&lt;/P&gt;&lt;P&gt;2, abe, 30&lt;/P&gt;&lt;P&gt;3, general 40&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;file 2&lt;/P&gt;&lt;P&gt;ID, Name, Age&lt;/P&gt;&lt;P&gt;1, Joe, 21&lt;/P&gt;&lt;P&gt;2, abe, 30&lt;/P&gt;&lt;P&gt;3, sam,41&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what I am trying to do is get a table that shows the following&lt;/P&gt;&lt;P&gt;ID, Name, File1 age, file2 age&lt;/P&gt;&lt;P&gt;1, joe , 20,21&lt;/P&gt;&lt;P&gt;2, abe, 30,30&lt;/P&gt;&lt;P&gt;3, sam,40,41&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so if the name in the first file is General, replace it with the name in the second file&lt;/P&gt;&lt;P&gt;what I am getting sofar is&amp;nbsp;&lt;/P&gt;&lt;P&gt;1,joe,20,-&lt;/P&gt;&lt;P&gt;1,general, -,21&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FILE1:&lt;BR /&gt;NoConcatenate&lt;BR /&gt;LOAD&lt;BR /&gt;*,&lt;BR /&gt;IF(ID &amp;amp; '|' &amp;amp; NAME) AS PRIKEY&lt;BR /&gt;FROM&lt;BR /&gt;[c:\file1.xlsx]&lt;BR /&gt;(ooxml, embedded labels);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FILE2:&lt;BR /&gt;NoConcatenate&lt;BR /&gt;LOAD&lt;BR /&gt;*,&lt;BR /&gt;IF(ID &amp;amp; '|' &amp;amp; if(NAME = 'General', File1.Name, Name)) AS PRIKEY // I don't know how to substitute this name if the name is general&lt;BR /&gt;FROM&lt;BR /&gt;[c:\file2.xlsx]&lt;BR /&gt;(ooxml, embedded labels);&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2020 16:07:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-similar-file-comparison/m-p/1742916#M453076</guid>
      <dc:creator>RogerG</dc:creator>
      <dc:date>2020-09-10T16:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: 2 similar file comparison</title>
      <link>https://community.qlik.com/t5/QlikView/2-similar-file-comparison/m-p/1742927#M453077</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;File1:
LOAD * INLINE [
    ID, Name, Age
    1, General, 20
    2, abe, 30
    3, general, 40
];

File2:
NoConcatenate
LOAD * INLINE [
    ID, Name, Age
    1, Joe, 21
    2, abe, 30
    3, sam, 41
];

Left Join (File2)
LOAD ID,
	 Name as NameTmp,
	 Age as File1Age
Resident File1;

DROP Table File1;

FinalTable:
LOAD ID,
	 If(WildMatch(NameTmp, 'general'), Name, NameTmp) as Name,
	 File1Age,
	 Age as File2Age
Resident File2;

DROP Table File2;&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 10 Sep 2020 16:33:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-similar-file-comparison/m-p/1742927#M453077</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-09-10T16:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: 2 similar file comparison</title>
      <link>https://community.qlik.com/t5/QlikView/2-similar-file-comparison/m-p/1742931#M453078</link>
      <description>&lt;P&gt;the assumption here is the ID is a unique key.&amp;nbsp; I should have put RandomNumber as the field name.&amp;nbsp; hence the combined key to join the 2 tables.&amp;nbsp; I am closer, but still have issues.&lt;/P&gt;&lt;P&gt;lets change the data in file 1 to be&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;code&amp;gt;&lt;/P&gt;&lt;P&gt;ID, Name, Age&lt;/P&gt;&lt;P&gt;1, General, 20&lt;/P&gt;&lt;P&gt;2, abe, 30&lt;/P&gt;&lt;P&gt;3, general 40&lt;/P&gt;&lt;P&gt;2, larry, 45&lt;/P&gt;&lt;P&gt;1, mary, 23&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am closer with your answer though, just don't have the join between the 2 tables at this time.&amp;nbsp; the goal is to identify what is missing from the second table, but through a conversion of systems, the names have changed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2020 17:36:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-similar-file-comparison/m-p/1742931#M453078</guid>
      <dc:creator>RogerG</dc:creator>
      <dc:date>2020-09-10T17:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: 2 similar file comparison</title>
      <link>https://community.qlik.com/t5/QlikView/2-similar-file-comparison/m-p/1742934#M453079</link>
      <description>&lt;P&gt;I am not sure I follow.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2020 18:00:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-similar-file-comparison/m-p/1742934#M453079</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-09-10T18:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: 2 similar file comparison</title>
      <link>https://community.qlik.com/t5/QlikView/2-similar-file-comparison/m-p/1742949#M453080</link>
      <description>&lt;P&gt;The problem with the code above, is it eliminates this real primary key&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;IF(ID &amp;amp; '|' &amp;amp; if(NAME = 'General', File1.Name, Name)) AS PRIKEY&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;the id and name are used to tie out other fields within each table, but the name must be mapped to the name in the second file as the first file name is no longer valid.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2020 19:21:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-similar-file-comparison/m-p/1742949#M453080</guid>
      <dc:creator>RogerG</dc:creator>
      <dc:date>2020-09-10T19:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: 2 similar file comparison</title>
      <link>https://community.qlik.com/t5/QlikView/2-similar-file-comparison/m-p/1742966#M453082</link>
      <description>&lt;P&gt;I just modified the excel files to include the needed columns.&amp;nbsp; your answer was correct though, thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2020 22:08:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-similar-file-comparison/m-p/1742966#M453082</guid>
      <dc:creator>RogerG</dc:creator>
      <dc:date>2020-09-10T22:08:51Z</dc:date>
    </item>
  </channel>
</rss>

