<?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 Linking 2 tables where not all data matches in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Linking-2-tables-where-not-all-data-matches/m-p/705077#M254220</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;I'm trying to do some analysis whereby I need to compare forecasted vs. actual volumes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The actual volumes are already in Qlikview, and the forecasted volumes are read in from an Excel spreadsheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My issue is with handling records which do not match. As per the below table, the actual and forecasted volumes are linked by a key made up of Country and Supplier. Where there is a country and supplier with both actual and forecasted volume, everything works fine and correctly returns data. My issue is where there is a country/supplier with actual but not forecasted volume, or forecasted but not actual volume - like the yellow highlighted rows in the below example. In scenarios such as this, the record will not exist in the table of data - for example, Australia4 will not exist in my Excel forecast data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" style="border: 1px solid #000000; border-image: none; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Country&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Supplier&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;KEY&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Actual Volume&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Forecasted Volume&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;China&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;China1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;50&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;40&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;India&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;India2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;20&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;UK&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;UK3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;30&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; background-color: #ffff99;"&gt;Australia&lt;/TD&gt;&lt;TD style="padding: 2px; background-color: #ffff99;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px; background-color: #ffff99;"&gt;Australia4&lt;/TD&gt;&lt;TD style="padding: 2px; background-color: #ffff99;"&gt;100&lt;/TD&gt;&lt;TD style="padding: 2px; background-color: #ffff99;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; background-color: #ffff99;"&gt;USA&lt;/TD&gt;&lt;TD style="padding: 2px; background-color: #ffff99;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px; background-color: #ffff99;"&gt;USA5&lt;/TD&gt;&lt;TD style="padding: 2px; background-color: #ffff99;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px; background-color: #ffff99;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whatever I do, I can't get ALL of the data to show in my table, there's always something missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm hoping there's a straight-forward solution to this that I've missed - any help much appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Oct 2014 16:09:30 GMT</pubDate>
    <dc:creator>danielle_v</dc:creator>
    <dc:date>2014-10-10T16:09:30Z</dc:date>
    <item>
      <title>Linking 2 tables where not all data matches</title>
      <link>https://community.qlik.com/t5/QlikView/Linking-2-tables-where-not-all-data-matches/m-p/705077#M254220</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;I'm trying to do some analysis whereby I need to compare forecasted vs. actual volumes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The actual volumes are already in Qlikview, and the forecasted volumes are read in from an Excel spreadsheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My issue is with handling records which do not match. As per the below table, the actual and forecasted volumes are linked by a key made up of Country and Supplier. Where there is a country and supplier with both actual and forecasted volume, everything works fine and correctly returns data. My issue is where there is a country/supplier with actual but not forecasted volume, or forecasted but not actual volume - like the yellow highlighted rows in the below example. In scenarios such as this, the record will not exist in the table of data - for example, Australia4 will not exist in my Excel forecast data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" style="border: 1px solid #000000; border-image: none; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Country&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Supplier&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;KEY&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Actual Volume&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Forecasted Volume&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;China&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;China1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;50&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;40&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;India&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;India2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;20&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;UK&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;UK3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;30&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; background-color: #ffff99;"&gt;Australia&lt;/TD&gt;&lt;TD style="padding: 2px; background-color: #ffff99;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px; background-color: #ffff99;"&gt;Australia4&lt;/TD&gt;&lt;TD style="padding: 2px; background-color: #ffff99;"&gt;100&lt;/TD&gt;&lt;TD style="padding: 2px; background-color: #ffff99;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; background-color: #ffff99;"&gt;USA&lt;/TD&gt;&lt;TD style="padding: 2px; background-color: #ffff99;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px; background-color: #ffff99;"&gt;USA5&lt;/TD&gt;&lt;TD style="padding: 2px; background-color: #ffff99;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px; background-color: #ffff99;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whatever I do, I can't get ALL of the data to show in my table, there's always something missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm hoping there's a straight-forward solution to this that I've missed - any help much appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 16:09:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linking-2-tables-where-not-all-data-matches/m-p/705077#M254220</guid>
      <dc:creator>danielle_v</dc:creator>
      <dc:date>2014-10-10T16:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Linking 2 tables where not all data matches</title>
      <link>https://community.qlik.com/t5/QlikView/Linking-2-tables-where-not-all-data-matches/m-p/705078#M254221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In case of missing data, what do you want to do? Do you want to ignore such data in your chart?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 16:42:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linking-2-tables-where-not-all-data-matches/m-p/705078#M254221</guid>
      <dc:creator>anbu1984</dc:creator>
      <dc:date>2014-10-10T16:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: Linking 2 tables where not all data matches</title>
      <link>https://community.qlik.com/t5/QlikView/Linking-2-tables-where-not-all-data-matches/m-p/705079#M254222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.63636302948px;"&gt;if you want to show the KEY with forecast &lt;STRONG&gt;and&lt;/STRONG&gt; actual you can try with (same for actual)&lt;/P&gt;&lt;P style="font-size: 13.63636302948px;"&gt;if(sum([Forecasted Volume])&amp;gt;0 and sum([Actual Volume])&amp;gt;0,&amp;nbsp; sum([Forecasted Volume]))&lt;/P&gt;&lt;P style="font-size: 13.63636302948px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.63636302948px;"&gt;in total mode use sum of rows&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 17:12:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linking-2-tables-where-not-all-data-matches/m-p/705079#M254222</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-10-10T17:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: Linking 2 tables where not all data matches</title>
      <link>https://community.qlik.com/t5/QlikView/Linking-2-tables-where-not-all-data-matches/m-p/705080#M254223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the responses on here, and so sorry for the delay in getting back to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to be able to include ALL records, regardless of whether they appear in the Actual Volume, the Forecasted Volume or both - so as per the example above, I need all 5 rows (including the yellow rows) to appear in my analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried left joining, but depending on which way I join, either the records where the Forecasted Volume is zero or the records where the Actual Volume is zero, are excluded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to be able to get to a point where I can show the full picture of forecast and actuals, without any reocrds missing.&lt;/P&gt;&lt;P&gt;Any help still greatly appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 16:15:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linking-2-tables-where-not-all-data-matches/m-p/705080#M254223</guid>
      <dc:creator>danielle_v</dc:creator>
      <dc:date>2014-11-25T16:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: Linking 2 tables where not all data matches</title>
      <link>https://community.qlik.com/t5/QlikView/Linking-2-tables-where-not-all-data-matches/m-p/705081#M254224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try loading up the table with the actuals and then do an OUTER JOIN to bring in the forecast.&amp;nbsp; This way all records will be brought in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can then set Null values in the script to zero:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(Len(Actual) = 0, 0, Actuals) as Actuals,&lt;/P&gt;&lt;P&gt;If(Len(Forecast) = 0, 0, Forecast) as Forecast&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 16:24:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linking-2-tables-where-not-all-data-matches/m-p/705081#M254224</guid>
      <dc:creator>jpapador</dc:creator>
      <dc:date>2014-11-25T16:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: Linking 2 tables where not all data matches</title>
      <link>https://community.qlik.com/t5/QlikView/Linking-2-tables-where-not-all-data-matches/m-p/705082#M254225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another option you have is to concatenate the actual and forecast data and identify each with a data source field in the script.&lt;/P&gt;&lt;P&gt;You then have slightly modified expressions for actual and forecast using set analysis to limit to the relevant data source.&lt;/P&gt;&lt;P&gt;eg&lt;/P&gt;&lt;P&gt;Fact:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;Country&lt;/P&gt;&lt;P&gt;Supplier&lt;/P&gt;&lt;P&gt;Country &amp;amp; Supplier AS KEY&lt;/P&gt;&lt;P&gt;Volume&lt;/P&gt;&lt;P&gt;'Actual' AS DATA_SOURCE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from your actual source here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate(Fact)&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;Country&lt;/P&gt;&lt;P&gt;Supplier&lt;/P&gt;&lt;P&gt;Country &amp;amp; Supplier AS KEY&lt;/P&gt;&lt;P&gt;Volume&lt;/P&gt;&lt;P&gt;'Forecast' AS DATA_SOURCE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from your forecast source here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then your expressions become&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;DATA_SOURCE={'Actual'}&amp;gt;} Volume)&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;DATA_SOURCE={'Forecast'}&amp;gt;} Volume)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope that helps&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 17:09:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linking-2-tables-where-not-all-data-matches/m-p/705082#M254225</guid>
      <dc:creator />
      <dc:date>2014-11-25T17:09:40Z</dc:date>
    </item>
  </channel>
</rss>

