<?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: Add new column with values from reference table in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Add-new-column-with-values-from-reference-table/m-p/1778082#M60402</link>
    <description>&lt;P&gt;I get the mistake that the value "Location" is not found&lt;/P&gt;</description>
    <pubDate>Thu, 28 Jan 2021 13:23:07 GMT</pubDate>
    <dc:creator>jan2</dc:creator>
    <dc:date>2021-01-28T13:23:07Z</dc:date>
    <item>
      <title>Add new column with values from reference table</title>
      <link>https://community.qlik.com/t5/App-Development/Add-new-column-with-values-from-reference-table/m-p/1778031#M60390</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I loaded a table with my main data and a reference table. Now I want to create a new column in the main data with a coresponding value from the reference table.&lt;/P&gt;&lt;P&gt;Simple example:&lt;/P&gt;&lt;P&gt;Main data contains the column Location. The reference table contains every location one time and a location_id for every location.&lt;/P&gt;&lt;P&gt;Now I need a new column in the main data which shows the right location_id for every location.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 17:33:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-new-column-with-values-from-reference-table/m-p/1778031#M60390</guid>
      <dc:creator>jan2</dc:creator>
      <dc:date>2024-11-16T17:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Add new column with values from reference table</title>
      <link>https://community.qlik.com/t5/App-Development/Add-new-column-with-values-from-reference-table/m-p/1778042#M60393</link>
      <description>&lt;P&gt;After loading the Main and Reference_Table, the basic structure for adding a column to Main would look like this:&lt;/P&gt;&lt;P&gt;Left Join (&lt;EM&gt;Main&lt;/EM&gt;)&lt;BR /&gt;Load Location,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;location_id&lt;BR /&gt;Resident &lt;EM&gt;Reference_Table&lt;/EM&gt;;&lt;/P&gt;&lt;P&gt;Note:&amp;nbsp; If you are going to leave the &lt;EM&gt;Reference_Table&lt;/EM&gt; in the model, you will want to rename the location_id in the &lt;EM&gt;Main&lt;/EM&gt; table to something distinct.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 10:46:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-new-column-with-values-from-reference-table/m-p/1778042#M60393</guid>
      <dc:creator>GaryGiles</dc:creator>
      <dc:date>2021-01-28T10:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Add new column with values from reference table</title>
      <link>https://community.qlik.com/t5/App-Development/Add-new-column-with-values-from-reference-table/m-p/1778082#M60402</link>
      <description>&lt;P&gt;I get the mistake that the value "Location" is not found&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 13:23:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-new-column-with-values-from-reference-table/m-p/1778082#M60402</guid>
      <dc:creator>jan2</dc:creator>
      <dc:date>2021-01-28T13:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: Add new column with values from reference table</title>
      <link>https://community.qlik.com/t5/App-Development/Add-new-column-with-values-from-reference-table/m-p/1778092#M60404</link>
      <description>&lt;P&gt;At the moment the syntax is like:&lt;/P&gt;&lt;P&gt;[Main]:&lt;/P&gt;&lt;P&gt;Load&amp;nbsp;&lt;/P&gt;&lt;P&gt;Location,&lt;/P&gt;&lt;P&gt;Data X,&lt;/P&gt;&lt;P&gt;Data Y&lt;/P&gt;&lt;P&gt;From[folder]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[Reference]&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;Location(Other name then in main table),&lt;/P&gt;&lt;P&gt;Location_ID,&lt;/P&gt;&lt;P&gt;Data Z&lt;/P&gt;&lt;P&gt;From[folder]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Left join[Main]&lt;/P&gt;&lt;P&gt;Load Location,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Location_ID&lt;/P&gt;&lt;P&gt;Resident Reference;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 13:36:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-new-column-with-values-from-reference-table/m-p/1778092#M60404</guid>
      <dc:creator>jan2</dc:creator>
      <dc:date>2021-01-28T13:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: Add new column with values from reference table</title>
      <link>https://community.qlik.com/t5/App-Development/Add-new-column-with-values-from-reference-table/m-p/1778273#M60434</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;[Main]:&lt;/P&gt;&lt;P&gt;Load&amp;nbsp;&lt;/P&gt;&lt;P&gt;Location,&lt;/P&gt;&lt;P&gt;Data X,&lt;/P&gt;&lt;P&gt;Data Y&lt;/P&gt;&lt;P&gt;From[folder]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[Reference]&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;Location,&lt;/P&gt;&lt;P&gt;Location_ID,&lt;/P&gt;&lt;P&gt;Data Z&lt;/P&gt;&lt;P&gt;From[folder]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Left join[Main]&lt;/P&gt;&lt;P&gt;Load Location,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Location_ID as Main.Location_ID&lt;/P&gt;&lt;P&gt;Resident Reference;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 23:54:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-new-column-with-values-from-reference-table/m-p/1778273#M60434</guid>
      <dc:creator>GaryGiles</dc:creator>
      <dc:date>2021-01-28T23:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Add new column with values from reference table</title>
      <link>https://community.qlik.com/t5/App-Development/Add-new-column-with-values-from-reference-table/m-p/1778290#M60442</link>
      <description>&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense/November2020/Subsystems/Hub/Content/Sense_Hub/Scripting/use-mapping-as-alternative-join.htm" target="_self"&gt;As described in the online help&lt;/A&gt; Using a left join isn't terribly efficient and is not the recommended way of doing this. Instead, if you are just looking to add a single column from your reference table you should use a mapping table, as described in the help &lt;A href="https://help.qlik.com/en-US/sense/November2020/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptPrefixes/Mapping.htm" target="_self"&gt;here&lt;/A&gt;. You'll also find this discussed in numerous posts here in Community.&lt;/P&gt;&lt;P&gt;It would look something like this:&lt;/P&gt;&lt;P&gt;Map_Location:&lt;BR /&gt;Mapping Load&lt;BR /&gt;Location,&lt;BR /&gt;Location_id&lt;BR /&gt;FROM [lib://mylib/ReferenceLocations.csv]&lt;BR /&gt;(csv);&lt;/P&gt;&lt;P&gt;Main:&lt;BR /&gt;Load&lt;BR /&gt;Field1,&lt;BR /&gt;Field2,&lt;BR /&gt;ApplyMap('Map_Location', Location, 'No location data exists') as Location_id&lt;BR /&gt;from [lib://mylib/filename.csv]&lt;BR /&gt;(csv);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You don't need to manage the mapping table as once the load is complete Qlik will simply discard it. This way you don't need to keep the reference data in your app beyond what is needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 02:17:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-new-column-with-values-from-reference-table/m-p/1778290#M60442</guid>
      <dc:creator>Rodj</dc:creator>
      <dc:date>2021-01-29T02:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: Add new column with values from reference table</title>
      <link>https://community.qlik.com/t5/App-Development/Add-new-column-with-values-from-reference-table/m-p/1778393#M60469</link>
      <description>&lt;P&gt;In the Map_Location: it can't find the Location, probably because it is not in the Reference Location&amp;nbsp; csv but in the main data csv&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 10:36:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-new-column-with-values-from-reference-table/m-p/1778393#M60469</guid>
      <dc:creator>jan2</dc:creator>
      <dc:date>2021-01-29T10:36:50Z</dc:date>
    </item>
  </channel>
</rss>

