<?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: Use Apply Map? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Use-Apply-Map/m-p/908893#M315626</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually, I always use distinct with mapping load, unless it is inline load...&lt;/P&gt;&lt;P&gt;In your case, the reason for duplicate could be field FiscYrPer which is not used in mapping load.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Aug 2015 10:34:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-08-04T10:34:59Z</dc:date>
    <item>
      <title>Use Apply Map?</title>
      <link>https://community.qlik.com/t5/QlikView/Use-Apply-Map/m-p/908890#M315623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Relatively new to Qlikview. From what I can tell - Apply map appears to be the best option for the below scenario but a bit unsure of how it would work. Have looked through and researched numerous examples.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently have 2 tables in my Qlikview document&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1&lt;/P&gt;&lt;P&gt;Org,AcctId,Currency, ContraOrg,ContraAcctId,ContraCurrency&lt;/P&gt;&lt;P&gt;NZ,611023,AUD,AU,811022,AUD&lt;/P&gt;&lt;P&gt;AU,811022,AUD,NZ,611023,AUD&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2&lt;/P&gt;&lt;P&gt;Org,AcctId,Currency,FiscYrPer,Amount&lt;/P&gt;&lt;P&gt;NZ,611023,AUD,201412,-15200&lt;/P&gt;&lt;P&gt;AU,811022,AUD,201412,15200&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ultimately i need to sum off the values of the two amounts to result in a balance Amount of '0'. My approach had been to concatenate the 1st 3 fields of of the first line in table one (NZ-611023-AUD) to retrieve the related Amount in Table 2 ( -15200). I do the same for the next 3 fields on the first line in table 1 (AU-811022-AUD) to retrieve the related amount (which is line number 2 of Table 2) and call this the ContraAmount (15200)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Final Table &lt;/P&gt;&lt;P&gt;Org,AcctId,Currency, ContraOrg,ContraAcctId,ContraCurrency,Amount,ContraAmount&lt;/P&gt;&lt;P&gt;NZ,611023,AUD,AU,811022,AUD,-15200,15200&lt;/P&gt;&lt;P&gt;AU,811022,AUD,NZ,611023,AUD,-15200,15200&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any guidance on how to achieve the above would be greatly appreciated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Taf &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2015 21:59:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-Apply-Map/m-p/908890#M315623</guid>
      <dc:creator />
      <dc:date>2015-08-03T21:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Use Apply Map?</title>
      <link>https://community.qlik.com/t5/QlikView/Use-Apply-Map/m-p/908891#M315624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See if this helps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MapTable:&lt;BR /&gt;MAPPING LOAD DISTINCT&lt;BR /&gt;Org&amp;amp;AcctId&amp;amp;Currency as A,&lt;BR /&gt;Amount as B&lt;BR /&gt;RESIDENT Table2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result:&lt;BR /&gt;LOAD&lt;BR /&gt;Org,AcctId,Currency, ContraOrg,ContraAcctId,ContraCurrency,&lt;BR /&gt;applymap('MapTable', Org&amp;amp;AcctId&amp;amp;Currency) as Amount,&lt;BR /&gt;applymap('MapTable', ContraOrg&amp;amp;ContraAcctId&amp;amp;contraCurrency) as ContraAmount&lt;BR /&gt;RESIDENT Table1;&lt;/P&gt;&lt;P&gt;DROP Tables Table1, Table2;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2015 23:47:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-Apply-Map/m-p/908891#M315624</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-03T23:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: Use Apply Map?</title>
      <link>https://community.qlik.com/t5/QlikView/Use-Apply-Map/m-p/908892#M315625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your response Michael. Although the example script you provided did not give me the results i was expecting - it did however help to modify my script slightly to use "MAPPING LOAD DISTINCT" and not just 'MAPPING LOAD'.&lt;/P&gt;&lt;P&gt;Part of my issue was that my apply map function was giving me duplicate records and i could not (still not to be honest ) understand how they were being created. Now wit&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;h MAPPING DISTINCT I no longer have the duplicate records issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 03:33:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-Apply-Map/m-p/908892#M315625</guid>
      <dc:creator />
      <dc:date>2015-08-04T03:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: Use Apply Map?</title>
      <link>https://community.qlik.com/t5/QlikView/Use-Apply-Map/m-p/908893#M315626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually, I always use distinct with mapping load, unless it is inline load...&lt;/P&gt;&lt;P&gt;In your case, the reason for duplicate could be field FiscYrPer which is not used in mapping load.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 10:34:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-Apply-Map/m-p/908893#M315626</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-04T10:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: Use Apply Map?</title>
      <link>https://community.qlik.com/t5/QlikView/Use-Apply-Map/m-p/908894#M315627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think your key&amp;nbsp; Org,AcctId,Currency,(AU-811022-AUD) will not give you an unique key identifier as the second table is also having a date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also , you have common fields between your tables and they probably giving you synthetic keys and they must be avoided.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Post your data file so that we could help you out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Sasi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 10:44:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-Apply-Map/m-p/908894#M315627</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2015-08-04T10:44:49Z</dc:date>
    </item>
  </channel>
</rss>

