<?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 Comparing fields in separate tables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Comparing-fields-in-separate-tables/m-p/1000697#M952797</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 got an issue I can't seem to fix despite Googling. I have two tables defined in my load script;&lt;/P&gt;&lt;P&gt;-&amp;gt; Table Billing_Documents&lt;/P&gt;&lt;P&gt;-&amp;gt; Table Sales_Orders&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both contain the key 'SALES_DOCUMENT' and 'SALES_DOCUMENT_ITEM'. Now I want to add a third table which compares the unitprice &lt;SPAN style="font-size: 13.3333px;"&gt;between order and invoice &lt;/SPAN&gt;on item-level. SALES_DOCUMENT and SALES_DOCUMENT_ITEM should be the unique key together. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently I'm trying to do as follows, however this doesn't seem to do anything (BILLING_ITEM_NET_PRICE comes from table Billing_documents, SO_ITEM_NET_PRICE is from table Sales_orders);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMPARE_TAB:&lt;/P&gt;&lt;P&gt;load &lt;/P&gt;&lt;P&gt;SALES_DOCUMENT,&lt;/P&gt;&lt;P&gt;SALES_DOCUMENT_ITEM,&lt;/P&gt;&lt;P&gt;BILLING_ITEM_NET_PRICE,&lt;/P&gt;&lt;P&gt;SO_ITEM_NET_PRICE,&lt;/P&gt;&lt;P&gt;IF(SO_ITEM_NET_PRICE=BILLING_ITEM_NET_PRICE,'Yes','No') As Compare;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I doing wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 28 Nov 2015 18:41:02 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-11-28T18:41:02Z</dc:date>
    <item>
      <title>Comparing fields in separate tables</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-fields-in-separate-tables/m-p/1000697#M952797</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 got an issue I can't seem to fix despite Googling. I have two tables defined in my load script;&lt;/P&gt;&lt;P&gt;-&amp;gt; Table Billing_Documents&lt;/P&gt;&lt;P&gt;-&amp;gt; Table Sales_Orders&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both contain the key 'SALES_DOCUMENT' and 'SALES_DOCUMENT_ITEM'. Now I want to add a third table which compares the unitprice &lt;SPAN style="font-size: 13.3333px;"&gt;between order and invoice &lt;/SPAN&gt;on item-level. SALES_DOCUMENT and SALES_DOCUMENT_ITEM should be the unique key together. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently I'm trying to do as follows, however this doesn't seem to do anything (BILLING_ITEM_NET_PRICE comes from table Billing_documents, SO_ITEM_NET_PRICE is from table Sales_orders);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMPARE_TAB:&lt;/P&gt;&lt;P&gt;load &lt;/P&gt;&lt;P&gt;SALES_DOCUMENT,&lt;/P&gt;&lt;P&gt;SALES_DOCUMENT_ITEM,&lt;/P&gt;&lt;P&gt;BILLING_ITEM_NET_PRICE,&lt;/P&gt;&lt;P&gt;SO_ITEM_NET_PRICE,&lt;/P&gt;&lt;P&gt;IF(SO_ITEM_NET_PRICE=BILLING_ITEM_NET_PRICE,'Yes','No') As Compare;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I doing wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Nov 2015 18:41:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-fields-in-separate-tables/m-p/1000697#M952797</guid>
      <dc:creator />
      <dc:date>2015-11-28T18:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing fields in separate tables</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-fields-in-separate-tables/m-p/1000698#M952798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You either need to join both tables into one, so you can access the required price fields within the same LOAD, or you need to Lookup() or ApplyMap() the price values for the keys from one table into the other.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CheckPerJOIN:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SALES_DOCUMENT,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SALES_DOCUMENT_ITEM,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BILLING_ITEM_NET_PRICE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; FROM Billing_Documents;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INNER JOIN &lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SALES_DOCUMENT,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SALES_DOCUMENT_ITEM,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SO_ITEM_NET_PRICE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FROM Sales_Orders;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMPARE:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SALES_DOCUMENT,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SALES_DOCUMENT_ITEM,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;BILLING_ITEM_NET_PRICE,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SO_ITEM_NET_PRICE,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(SO_ITEM_NET_PRICE=BILLING_ITEM_NET_PRICE,'Yes','No') As Compare&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;RESIDENT CheckPerJOIN;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;DROP TABLE CheckPerJOIN;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Nov 2015 02:30:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-fields-in-separate-tables/m-p/1000698#M952798</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-11-29T02:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing fields in separate tables</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-fields-in-separate-tables/m-p/1000699#M952799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, great solution!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Dec 2015 15:22:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-fields-in-separate-tables/m-p/1000699#M952799</guid>
      <dc:creator />
      <dc:date>2015-12-05T15:22:48Z</dc:date>
    </item>
  </channel>
</rss>

