<?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: Additional field in crosstable load in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Additional-field-in-crosstable-load/m-p/322866#M1184945</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DCode doesn't exist until you finish the crosstable load, because you're building DCode in the crosstable load.&amp;nbsp; So you can't refer to it in the load, because it doesn't exist yet.&amp;nbsp; If I've understood what you want, you could left join after the crosstable load.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LEFT JOIN (Whatever)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD DISTINCT&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Type&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,PCode&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,DCode&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,Type&amp;amp;PCode&amp;amp;DCode as NEWCOL&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;RESIDENT Whatever&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Nov 2011 00:16:39 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2011-11-16T00:16:39Z</dc:date>
    <item>
      <title>Additional field in crosstable load</title>
      <link>https://community.qlik.com/t5/QlikView/Additional-field-in-crosstable-load/m-p/322865#M1184944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is my crosstable load:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿Crosstable (DCode, Data,2)&lt;/P&gt;&lt;P&gt;LOAD Type,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PCode,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [1],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [2],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [3],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [4],&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [12]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM etc.etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to load a column which combines the columns Type, PCode and DCode as NEWCOL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So after [12], I have a new line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Type&amp;amp;PCode&amp;amp;DCode as NEWCOL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I try to do that, I get a message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Field Not Found - &amp;lt;DCode&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Ideas anyone?&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 00:11:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Additional-field-in-crosstable-load/m-p/322865#M1184944</guid>
      <dc:creator>mazacini</dc:creator>
      <dc:date>2011-11-16T00:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: Additional field in crosstable load</title>
      <link>https://community.qlik.com/t5/QlikView/Additional-field-in-crosstable-load/m-p/322866#M1184945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DCode doesn't exist until you finish the crosstable load, because you're building DCode in the crosstable load.&amp;nbsp; So you can't refer to it in the load, because it doesn't exist yet.&amp;nbsp; If I've understood what you want, you could left join after the crosstable load.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LEFT JOIN (Whatever)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD DISTINCT&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Type&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,PCode&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,DCode&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,Type&amp;amp;PCode&amp;amp;DCode as NEWCOL&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;RESIDENT Whatever&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 00:16:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Additional-field-in-crosstable-load/m-p/322866#M1184945</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-11-16T00:16:39Z</dc:date>
    </item>
    <item>
      <title>Additional field in crosstable load</title>
      <link>https://community.qlik.com/t5/QlikView/Additional-field-in-crosstable-load/m-p/322867#M1184946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get what you are saying about DCode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I haven't used RESIDENT before. Would you mind explaining how it works?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 00:28:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Additional-field-in-crosstable-load/m-p/322867#M1184946</guid>
      <dc:creator>mazacini</dc:creator>
      <dc:date>2011-11-16T00:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Additional field in crosstable load</title>
      <link>https://community.qlik.com/t5/QlikView/Additional-field-in-crosstable-load/m-p/322868#M1184947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;RESIDENT loads from a table that you're already loaded into memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Data:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD * INLINE [&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Key, Value1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;A, 50&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;B, 100&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LEFT JOIN (Data)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Key&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,Value1 + 10 as Value2&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;RESIDENT Data&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Will give you this table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Data:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Key, Value1, Value2&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;A, 50, 60&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;B, 100, 110&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm sure there's a lot more information in the documentation.&amp;nbsp; In the specific example above, you'd be better off doing the calculation in the initial load.&amp;nbsp; In many other examples, you're better off doing the calculation in a preceding load.&amp;nbsp; But in some cases, such as a crosstable load, neither of those options is available, and the left join resident is a reasonable approach.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 00:34:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Additional-field-in-crosstable-load/m-p/322868#M1184947</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-11-16T00:34:21Z</dc:date>
    </item>
    <item>
      <title>Additional field in crosstable load</title>
      <link>https://community.qlik.com/t5/QlikView/Additional-field-in-crosstable-load/m-p/322869#M1184948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the clarification - It allows me to better understand the solution proposed in your first response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you believe that there is NO reference to the RESIDENT in the tutorial. The manual does refer to it, but only by way of providing syntax, and not by explaining its function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is frustrating for a non technical person like myself. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thats why the community is so great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will test your solution in the morning, when I assume I wll be able to mark it correct.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 00:54:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Additional-field-in-crosstable-load/m-p/322869#M1184948</guid>
      <dc:creator>mazacini</dc:creator>
      <dc:date>2011-11-16T00:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: Additional field in crosstable load</title>
      <link>https://community.qlik.com/t5/QlikView/Additional-field-in-crosstable-load/m-p/322870#M1184949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow.&amp;nbsp; Yeah, all I could find with a quick glance through the help file was this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;resident is used if data should be loaded from a previously loaded input table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That hardly seems like adequate documentation, particularly for something so very fundamental.&amp;nbsp; I use resident loads constantly.&amp;nbsp; It tends to be better for performance when you can avoid them, but you can't always avoid them.&amp;nbsp; I can almost never avoid them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 00:57:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Additional-field-in-crosstable-load/m-p/322870#M1184949</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-11-16T00:57:40Z</dc:date>
    </item>
    <item>
      <title>Additional field in crosstable load</title>
      <link>https://community.qlik.com/t5/QlikView/Additional-field-in-crosstable-load/m-p/322871#M1184950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi John&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you had a moment, coudl you possibly explain how DISTINCT works in the above?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had another issue with LEFT JOIN here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/167004#167004"&gt;http://community.qlik.com/message/167004#167004&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In fact I think I resolved this by using DISTINCT - but I have no idea why!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2011 10:32:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Additional-field-in-crosstable-load/m-p/322871#M1184950</guid>
      <dc:creator>mazacini</dc:creator>
      <dc:date>2011-11-22T10:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Additional field in crosstable load</title>
      <link>https://community.qlik.com/t5/QlikView/Additional-field-in-crosstable-load/m-p/322872#M1184951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let's say your data looks like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Type, PCode, DCode&lt;BR /&gt;A, B, C&lt;BR /&gt;A, B, C&lt;BR /&gt;D, E, F&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you don't use distinct, each of the two ABC rows will join to each of the two ABC rows, thus creating four ABC rows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Type, PCode, DCode, NEWCOL&lt;BR /&gt;A, B, C, ABC&lt;BR /&gt;A, B, C, ABC&lt;BR /&gt;A, B, C, ABC&lt;BR /&gt;A, B, C, ABC&lt;BR /&gt;D, E, F, DEF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This sort of error is often difficult to spot, because QlikView only shows you unique combinations of fields when you display data, so those four rows would look like a single row most of the time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can guarantee that values won't repeat like this, you could eliminate the distinct, which would probably speed up the script slightly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Nov 2011 18:10:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Additional-field-in-crosstable-load/m-p/322872#M1184951</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-11-28T18:10:15Z</dc:date>
    </item>
  </channel>
</rss>

