<?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 Matching fields to data in different table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Matching-fields-to-data-in-different-table/m-p/325994#M1191037</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you load the Excel worksheet having the branch number, name and other attributes in one table, it will solve your problem and you can remove the 'if' statements to map [Branch No] to [Branch Name].&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Jun 2011 09:25:56 GMT</pubDate>
    <dc:creator>nagaiank</dc:creator>
    <dc:date>2011-06-28T09:25:56Z</dc:date>
    <item>
      <title>Matching fields to data in different table</title>
      <link>https://community.qlik.com/t5/QlikView/Matching-fields-to-data-in-different-table/m-p/325993#M1191036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a QV app that is tracking applications and transactions of a new company we have taken over. For the project we started with 25 "pilot" stores. In our application extract we only have branch numbers, but for my report I needed to add branch names as well. Because there were so few stores I just loaded this into my script using if statements - (if([Branch No]='837','Ackermans Bellville', if([Branch No]='793','Ackermans Canal Walk', etc. as [Branch Name]).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But now we have rolled out to the entire country and there are 560 stores. I am not loading this into my script obviously. I have an excel sheet with all of the branch numbers, store names and all other information. I need to load this entire document into qlikview and then in my application and transaction extracts I need to match the branch numbers to the store names in this spreadsheet. Kinda like a VLookup in excel would do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My script currently consists of 3 comma delimited files:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Account Extract (all account holder details, including &lt;STRONG&gt;store of opening&lt;/STRONG&gt;). This extract gets replaced every day.&lt;/LI&gt;&lt;LI&gt;Daily Transaction Extract (transactional data of all customers, including &lt;STRONG&gt;store number&lt;/STRONG&gt; where they purchased). I use the where exists(Account No) statement to only load transactions of account holders in the above account extract. This file gets concatenated daily (not replaced).&lt;/LI&gt;&lt;LI&gt;Daily Application Extract (new applications received, either approved or declined) - with the &lt;STRONG&gt;store numbers&lt;/STRONG&gt; of where they applied. Also concatenated daily.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you can see in all 3 extracts there are fields showing the store number - for all of them I need to match this to a store name, using the excel spreadsheet that I want to load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have NO IDEA how to do this....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gerhard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2011 09:11:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Matching-fields-to-data-in-different-table/m-p/325993#M1191036</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2011-06-28T09:11:51Z</dc:date>
    </item>
    <item>
      <title>Matching fields to data in different table</title>
      <link>https://community.qlik.com/t5/QlikView/Matching-fields-to-data-in-different-table/m-p/325994#M1191037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you load the Excel worksheet having the branch number, name and other attributes in one table, it will solve your problem and you can remove the 'if' statements to map [Branch No] to [Branch Name].&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2011 09:25:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Matching-fields-to-data-in-different-table/m-p/325994#M1191037</guid>
      <dc:creator>nagaiank</dc:creator>
      <dc:date>2011-06-28T09:25:56Z</dc:date>
    </item>
    <item>
      <title>Matching fields to data in different table</title>
      <link>https://community.qlik.com/t5/QlikView/Matching-fields-to-data-in-different-table/m-p/325995#M1191038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I must be doing something wrong because I get the "your document contains loops" message when I load the script this way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2011 09:32:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Matching-fields-to-data-in-different-table/m-p/325995#M1191038</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2011-06-28T09:32:57Z</dc:date>
    </item>
    <item>
      <title>Matching fields to data in different table</title>
      <link>https://community.qlik.com/t5/QlikView/Matching-fields-to-data-in-different-table/m-p/325996#M1191039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you post your qvw file with sample data or at least your script, the forum will be able to help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2011 09:38:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Matching-fields-to-data-in-different-table/m-p/325996#M1191039</guid>
      <dc:creator>nagaiank</dc:creator>
      <dc:date>2011-06-28T09:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: Matching fields to data in different table</title>
      <link>https://community.qlik.com/t5/QlikView/Matching-fields-to-data-in-different-table/m-p/325997#M1191040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Gerhard,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems to me an example of one of the uses for ApplyMap() function, if I got you right&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;StoreCodeNameMap: // one map will do for all tables&lt;/P&gt;&lt;P&gt;MAPPING LOAD Code,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name&lt;/P&gt;&lt;P&gt;FROM File.xls;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AccountExtract:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ApplyMap('StoreCodeNameMap', Code, 'Name not found') AS Extract_Store_Name &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // "Name not found" literal above will be returned should no code match the mapping table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Making easier to identify where the problem is&lt;/P&gt;&lt;P&gt;FROM Extracts.Source;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Transactions:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ApplyMap('StoreCodeNameMap', Code, 'Name not found') AS Transactions_Store_Name&lt;/P&gt;&lt;P&gt;FROM Transactions.Source;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2011 09:43:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Matching-fields-to-data-in-different-table/m-p/325997#M1191040</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-06-28T09:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Matching fields to data in different table</title>
      <link>https://community.qlik.com/t5/QlikView/Matching-fields-to-data-in-different-table/m-p/325998#M1191041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Works like a charm! Beautiful, thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2011 10:43:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Matching-fields-to-data-in-different-table/m-p/325998#M1191041</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2011-06-28T10:43:14Z</dc:date>
    </item>
  </channel>
</rss>

