<?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 Add field to transaction table (match on multiple fields) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Add-field-to-transaction-table-match-on-multiple-fields/m-p/312515#M711544</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I got it working - thanks for your replies&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solution:&lt;/P&gt;&lt;P&gt;left join intervalmatch (AccountingDate,ProductID,Chain) load StartDate,EndDate,ProductID,Chain resident SupplierBonus;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;LEFT JOIN (Sales-transaction) LOAD * Resident SupplierBonus;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" id="result_box" lang="en"&gt;&lt;SPAN class="hps" title="Klik her for at få vist alternative oversættelser"&gt;2&lt;/SPAN&gt; &lt;SPAN class="hps" title="Klik her for at få vist alternative oversættelser"&gt;things&lt;/SPAN&gt; &lt;SPAN class="hps" title="Klik her for at få vist alternative oversættelser"&gt;caused&lt;/SPAN&gt; &lt;SPAN class="hps" title="Klik her for at få vist alternative oversættelser"&gt;me&lt;/SPAN&gt; &lt;SPAN class="hps" title="Klik her for at få vist alternative oversættelser"&gt;problems, but here is the fixes&lt;/SPAN&gt;&lt;/SPAN&gt;:&lt;/P&gt;&lt;P&gt;1) Format of AccountingDate,StartDate and EndDate - I had to make an explicit formatting of each field (Date#)&lt;/P&gt;&lt;P&gt;2) How to get the field Bonus (from SupplierBonus) - I added the last left join &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a nice day &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 May 2011 06:36:13 GMT</pubDate>
    <dc:creator>jstensig</dc:creator>
    <dc:date>2011-05-25T06:36:13Z</dc:date>
    <item>
      <title>Add field to transaction table (match on multiple fields)</title>
      <link>https://community.qlik.com/t5/QlikView/Add-field-to-transaction-table-match-on-multiple-fields/m-p/312510#M711539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to find a way to add Supplier bonus to my Sales-transaction table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Supplier bonus"-table:&lt;/P&gt;&lt;P&gt;ProductID&lt;/P&gt;&lt;P&gt;Chain (Supplier-bonus is releated to specific customer-groups = Chains)&lt;/P&gt;&lt;P&gt;DateStart (Startdate - typically first day in a quater, but sometimes first day in a year or month)&lt;/P&gt;&lt;P&gt;DateEnd (Enddate - typically last day in a quater, but sometimes last day in a year or month)&lt;/P&gt;&lt;P&gt;Bonus (Bonus for each ProductID, in the given Chain, between DateStart and DateStart)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Sales-transaction" (relevant fields)&lt;/P&gt;&lt;P&gt;ProductID&lt;/P&gt;&lt;P&gt;Chain (to which Chain is the transaction-line related)&lt;/P&gt;&lt;P&gt;AccountingDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that ApplyMap is the way to go and it´s pretty simple if I only had to map on ProductID &amp;amp; Chain, but the trouble is the date-part (DateStart/DateEnd vs. AccountingDate).&lt;/P&gt;&lt;P&gt;I can't figure out how to handle the date-part, sometimes Supplier bonus is related to quater, sometimes a year etc etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas out there?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2011 12:24:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-field-to-transaction-table-match-on-multiple-fields/m-p/312510#M711539</guid>
      <dc:creator>jstensig</dc:creator>
      <dc:date>2011-05-19T12:24:40Z</dc:date>
    </item>
    <item>
      <title>Add field to transaction table (match on multiple fields)</title>
      <link>https://community.qlik.com/t5/QlikView/Add-field-to-transaction-table-match-on-multiple-fields/m-p/312511#M711540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wonder if a combination of ApplyMap and IntervalMatch could do the job ... but how do I set this up?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 07:08:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-field-to-transaction-table-match-on-multiple-fields/m-p/312511#M711540</guid>
      <dc:creator>jstensig</dc:creator>
      <dc:date>2011-05-23T07:08:27Z</dc:date>
    </item>
    <item>
      <title>Add field to transaction table (match on multiple fields)</title>
      <link>https://community.qlik.com/t5/QlikView/Add-field-to-transaction-table-match-on-multiple-fields/m-p/312512#M711541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add this to both tables&lt;/P&gt;&lt;P&gt;[Product ID] &amp;amp; '|' &amp;amp; [Chain] as '_product_id_chain'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now comment out ProductID and Chain from the "Sales-Transaction" table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now add this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEFT JOIN ("Sales-transaction") LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _product_id_chain,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Bonus&lt;/P&gt;&lt;P&gt;RESIDENT "Supplier bonus";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You're still going to have synthetic keys if you do it this way but you said you wanted bonus in the Sales transaction table so there's no getting around it unless you just do the first thing I said and ignore the part with the left join.&amp;nbsp; Personally I would just comment out Product ID and Chain from the Sales Transaction Table, add the _product_id_chain field, and be done with it.&amp;nbsp; I don't really see why you need bonus in that table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 20:52:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-field-to-transaction-table-match-on-multiple-fields/m-p/312512#M711541</guid>
      <dc:creator />
      <dc:date>2011-05-23T20:52:00Z</dc:date>
    </item>
    <item>
      <title>Add field to transaction table (match on multiple fields)</title>
      <link>https://community.qlik.com/t5/QlikView/Add-field-to-transaction-table-match-on-multiple-fields/m-p/312513#M711542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Trent,&lt;/P&gt;&lt;P&gt;Thank you for replying. I see your point, but still misses the date-part. Here comes an example:&lt;/P&gt;&lt;P&gt;ProductID 1&lt;/P&gt;&lt;P&gt;Supplier gives a bonus of $1 per sold good in first half of 2010, for customers belonging to Chain A&lt;/P&gt;&lt;P&gt;Supplier gives a bonus of $1.1 per sold good in second half of 2010, for customers belonging to Chain A&lt;/P&gt;&lt;P&gt;Supplier gives a bonus of $0.8 per sold good in 2010, for customers belonging to Chain B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Summary:&lt;/P&gt;&lt;P&gt;Chain A: bonus for ProductID=1 is different between first and second half of 2010 ($1 vs. $1.1)&lt;/P&gt;&lt;P&gt;Chain B: bonus for ProductID=1 is the same during 2010 ($0.8)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that it&amp;nbsp; explains better what I'm struggling with. I &lt;SPAN class="hps" title="Klik her for at få vist alternative oversættelser"&gt;look&lt;/SPAN&gt; &lt;SPAN class="hps" title="Klik her for at få vist alternative oversættelser"&gt;forward&lt;/SPAN&gt; &lt;SPAN class="hps" title="Klik her for at få vist alternative oversættelser"&gt;to&lt;/SPAN&gt; &lt;SPAN class="hps" title="Klik her for at få vist alternative oversættelser"&gt;hearing&lt;/SPAN&gt; &lt;SPAN class="hps" title="Klik her for at få vist alternative oversættelser"&gt;from&lt;/SPAN&gt; &lt;SPAN class="hps" title="Klik her for at få vist alternative oversættelser"&gt;you again, also if you think I can do this in another way&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 22:49:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-field-to-transaction-table-match-on-multiple-fields/m-p/312513#M711542</guid>
      <dc:creator>jstensig</dc:creator>
      <dc:date>2011-05-23T22:49:17Z</dc:date>
    </item>
    <item>
      <title>Add field to transaction table (match on multiple fields)</title>
      <link>https://community.qlik.com/t5/QlikView/Add-field-to-transaction-table-match-on-multiple-fields/m-p/312514#M711543</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;If u use applymap between the two tables in the final table u are going to add the column AccountingDate &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;becoz Product and Chain is present in both the tables so If u use only intervalmatch to add the AccountingDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will be added for the DateStart and DateEnd which is available for a product and chain .So i think in this case &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Intervalmatch alone is enough . If i am wrong in understanding ur scenario please let me know &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2011 07:10:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-field-to-transaction-table-match-on-multiple-fields/m-p/312514#M711543</guid>
      <dc:creator>qliksus</dc:creator>
      <dc:date>2011-05-24T07:10:44Z</dc:date>
    </item>
    <item>
      <title>Add field to transaction table (match on multiple fields)</title>
      <link>https://community.qlik.com/t5/QlikView/Add-field-to-transaction-table-match-on-multiple-fields/m-p/312515#M711544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I got it working - thanks for your replies&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solution:&lt;/P&gt;&lt;P&gt;left join intervalmatch (AccountingDate,ProductID,Chain) load StartDate,EndDate,ProductID,Chain resident SupplierBonus;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;LEFT JOIN (Sales-transaction) LOAD * Resident SupplierBonus;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" id="result_box" lang="en"&gt;&lt;SPAN class="hps" title="Klik her for at få vist alternative oversættelser"&gt;2&lt;/SPAN&gt; &lt;SPAN class="hps" title="Klik her for at få vist alternative oversættelser"&gt;things&lt;/SPAN&gt; &lt;SPAN class="hps" title="Klik her for at få vist alternative oversættelser"&gt;caused&lt;/SPAN&gt; &lt;SPAN class="hps" title="Klik her for at få vist alternative oversættelser"&gt;me&lt;/SPAN&gt; &lt;SPAN class="hps" title="Klik her for at få vist alternative oversættelser"&gt;problems, but here is the fixes&lt;/SPAN&gt;&lt;/SPAN&gt;:&lt;/P&gt;&lt;P&gt;1) Format of AccountingDate,StartDate and EndDate - I had to make an explicit formatting of each field (Date#)&lt;/P&gt;&lt;P&gt;2) How to get the field Bonus (from SupplierBonus) - I added the last left join &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a nice day &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2011 06:36:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-field-to-transaction-table-match-on-multiple-fields/m-p/312515#M711544</guid>
      <dc:creator>jstensig</dc:creator>
      <dc:date>2011-05-25T06:36:13Z</dc:date>
    </item>
  </channel>
</rss>

