<?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: Omit dimension when not found in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Omit-dimension-when-not-found/m-p/464598#M699543</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Table1: &lt;/P&gt;&lt;P&gt;Load FirstName, Color From Table1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate (Table1) &lt;/P&gt;&lt;P&gt;Load Color, City From Table2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 25 Nov 2012 13:33:45 GMT</pubDate>
    <dc:creator>hic</dc:creator>
    <dc:date>2012-11-25T13:33:45Z</dc:date>
    <item>
      <title>Omit dimension when not found</title>
      <link>https://community.qlik.com/t5/QlikView/Omit-dimension-when-not-found/m-p/464597#M699542</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;using a loop I need to load data from tables where some dimensions are common between the tables, some are not. What should I put into load code so that all tables can be loaded by a single load (i.e. when dimension was not found load all other without raising an error)? In the below example I'd like to load all data from &lt;EM&gt;Table1&lt;/EM&gt; and &lt;EM&gt;Table2&lt;/EM&gt;, using a single load code, to get &lt;EM&gt;Table3&lt;/EM&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Przemek&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 _jivemacro_uid_13538488412975312" jivemacro_uid="_13538488412975312"&gt;&lt;P&gt;&lt;STRONG&gt;INPUT&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;Table1:&lt;/EM&gt; &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;FirstName, Color&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;John, Blue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;Table2: &lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Color, City&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Red, Berlin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OUTPUT&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;Table3:&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;FirstName, Surname, City&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;John, Blue, Null&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Null, Red, Berlin&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Nov 2012 13:24:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Omit-dimension-when-not-found/m-p/464597#M699542</guid>
      <dc:creator />
      <dc:date>2012-11-25T13:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Omit dimension when not found</title>
      <link>https://community.qlik.com/t5/QlikView/Omit-dimension-when-not-found/m-p/464598#M699543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Table1: &lt;/P&gt;&lt;P&gt;Load FirstName, Color From Table1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate (Table1) &lt;/P&gt;&lt;P&gt;Load Color, City From Table2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Nov 2012 13:33:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Omit-dimension-when-not-found/m-p/464598#M699543</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2012-11-25T13:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: Omit dimension when not found</title>
      <link>https://community.qlik.com/t5/QlikView/Omit-dimension-when-not-found/m-p/464599#M699544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure what you mean with 'loaded by a single load', I think you need two load statements when you adressing two different table sources.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Besides this, I think you can just load the two tables, QV will link the tables by Color field and should handle your request properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Table1: &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD * INLINE&amp;nbsp; [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FirstName, Color&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;John, Blue&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Table2: &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD * INLINE [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Color, City&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Red, Berlin&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or just add a JOIN before the second load, to join both tables, resulting in one final table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Table1: &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD * INLINE&amp;nbsp; [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FirstName, Color&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;John, Blue&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Table2: &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;JOIN LOAD * INLINE [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Color, City&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Red, Berlin&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: Just noticed Henrics suggestions, which is another alternative. I think it depends how you want to handle the records in both tables that may have same COLOR values. &lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Nov 2012 13:38:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Omit-dimension-when-not-found/m-p/464599#M699544</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-11-25T13:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: Omit dimension when not found</title>
      <link>https://community.qlik.com/t5/QlikView/Omit-dimension-when-not-found/m-p/464600#M699545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not that easy thing - there are thousands of tables. I look for a kind of a metafunction (let's call it NotFound()) that would check if dimension exists and omit it if not e.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR i=1 to 10000&lt;/P&gt;&lt;P&gt;LET Table = 'Table'&amp;amp;$(i);&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(NotFound(&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;FirstName), '', &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;FirstName&lt;/SPAN&gt;) AS &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;FirstName&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;If(NotFound(Color&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;), '', &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;Color&lt;/SPAN&gt;) AS &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;Color&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;If(NotFound(&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;City), '', &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;City&lt;/SPAN&gt;) AS &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;City&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FROM $(Table);&lt;/P&gt;&lt;P&gt;NEXT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Nov 2012 13:42:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Omit-dimension-when-not-found/m-p/464600#M699545</guid>
      <dc:creator />
      <dc:date>2012-11-25T13:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Omit dimension when not found</title>
      <link>https://community.qlik.com/t5/QlikView/Omit-dimension-when-not-found/m-p/464601#M699546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, the thing is I need to do it in a single statment...Otherwise will spend days creating statements.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Nov 2012 13:44:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Omit-dimension-when-not-found/m-p/464601#M699546</guid>
      <dc:creator />
      <dc:date>2012-11-25T13:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: Omit dimension when not found</title>
      <link>https://community.qlik.com/t5/QlikView/Omit-dimension-when-not-found/m-p/464602#M699547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or if you want ti do it in a loop, you can do something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set vConcatenate =&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;For each vFile in FileList('C:\directory\*.csv')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; $(vConcatenate)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Load * from [$(vFile)] ... ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Set vConcatenate = Concatenate ;&lt;/P&gt;&lt;P&gt;Next vFile&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Nov 2012 13:59:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Omit-dimension-when-not-found/m-p/464602#M699547</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2012-11-25T13:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: Omit dimension when not found</title>
      <link>https://community.qlik.com/t5/QlikView/Omit-dimension-when-not-found/m-p/464603#M699548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect! Thank you very much, Henric.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Nov 2012 14:33:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Omit-dimension-when-not-found/m-p/464603#M699548</guid>
      <dc:creator />
      <dc:date>2012-11-25T14:33:14Z</dc:date>
    </item>
  </channel>
</rss>

