<?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: Load data from excel to fill Null fields in Qlik in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Load-data-from-excel-to-fill-Null-fields-in-Qlik/m-p/2445571#M97660</link>
    <description>&lt;P&gt;Without sample data and a preview of your anticipated output, this is purely speculative.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Map_Spreadsheet:
Mapping LOAD "objective.id",
             Objective
               &amp;amp;'|'&amp;amp;
             "Objective Description"
               &amp;amp;'|'&amp;amp;
             "Objective Number"
               &amp;amp;'|'&amp;amp;
             "Control Number"
FROM ... csv;

tech_organizational_main_itemsTmp:
FROM `FROM `db`.`tech_organizational_main_items`;

Left Join(tech_organizational_main_itemsTmp) 
LOAD * `FROM `db`.`tech_organizational_controls`;

Left Join(tech_organizational_main_itemsTmp) 
LOAD * `db`.`tech_organizational_objective`;
 
tech_organizational_main_items:
LOAD *,
If(Len(Trim(Objective))=0,SubField(ApplyMap('Map_Spreadsheet',"objective.id"),'|',1), Objective) as Objective1,
If(Len(Trim("Objective Description"))=0,SubField(ApplyMap('Map_Spreadsheet',"objective.id","Objective Description"),'|',2), "Objective Description") as "Objective Description1",
SubField(ApplyMap('Map_Spreadsheet',"objective.id"),'|',3) as "Objective Number",
SubField(ApplyMap('Map_Spreadsheet',"objective.id"),'|',4) as "Control Number"
Resident [tech_organizational_main_items];

DROP Table tech_organizational_main_itemsTmp; 
DROP fields Objective, Objective Description";
RENAME Fields Objective1 to Objective, Objective Description1 to "Objective Description";&lt;/LI-CODE&gt;</description>
    <pubDate>Sat, 27 Apr 2024 11:56:34 GMT</pubDate>
    <dc:creator>BrunPierre</dc:creator>
    <dc:date>2024-04-27T11:56:34Z</dc:date>
    <item>
      <title>Load data from excel to fill Null fields in Qlik</title>
      <link>https://community.qlik.com/t5/App-Development/Load-data-from-excel-to-fill-Null-fields-in-Qlik/m-p/2445438#M97649</link>
      <description>&lt;P&gt;I am building a table of Objectives and Controls - I have all of the Controls in Qlik but some have missing &lt;STRONG&gt;Objective&lt;/STRONG&gt;&amp;nbsp;and &lt;STRONG&gt;Objective Description &lt;/STRONG&gt;fields&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also want to add &lt;STRONG&gt;Objective Number&lt;/STRONG&gt; and &lt;STRONG&gt;Control Number&lt;/STRONG&gt; which are new fields.&lt;/P&gt;
&lt;P&gt;I have created a spreadsheet, to upload the missing data and the new fileds.&lt;/P&gt;
&lt;P&gt;I am attempting LEFT JOIN in the load script, but none of the data is loading and I have no errors.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;DIV&gt;LEFT JOIN ([tech_organizational_main_items]) LOAD&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; [id] AS [control.id],&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; [parent_id] as [main_items.id],&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; [category_id] as [category.id],&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; [objective_id] as [objective.id],&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; [control_name] AS [Control],&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; [control_description] AS [Control Description];&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;SELECT id,&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; `parent_id`,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; `category_id`,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; `objective_id`,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; `control_name`,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; `control_description`&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;FROM `db`.`tech_organizational_controls`;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;LEFT JOIN ([tech_organizational_main_items]) LOAD&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; [id] AS [objective.id],&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; [obj_name] AS [Objective],&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; [obj_description] AS [Objective Description];&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;SELECT id,&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; `parent_id`,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; `obj_name`,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; `obj_description`&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;FROM `db`.`tech_organizational_objective`;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;LEFT JOIN ([tech_organizational_main_items]) LOAD&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; [control.id] as [control.id],&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; [Category Number],&lt;/DIV&gt;
&lt;DIV&gt;[objective.id],&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; [Objective],&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; [Objective Description],&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; [Control Number]&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;FROM [lib://Live - DB:DataFiles/ISO 27001_2022 Category Number Mapping - Qlik.csv]&lt;/DIV&gt;
&lt;DIV&gt;(txt, codepage is 28591, embedded labels, delimiter is ',', msq);&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2024 20:47:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-data-from-excel-to-fill-Null-fields-in-Qlik/m-p/2445438#M97649</guid>
      <dc:creator>Markbhai</dc:creator>
      <dc:date>2024-04-26T20:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: Load data from excel to fill Null fields in Qlik</title>
      <link>https://community.qlik.com/t5/App-Development/Load-data-from-excel-to-fill-Null-fields-in-Qlik/m-p/2445442#M97650</link>
      <description>&lt;P&gt;Your script has 3 tables that are Left Join another table. One of those is causing the issue. Possibly because there are no matches between one of these LEFT joins and final table being load.&lt;/P&gt;
&lt;P&gt;Try this first:&lt;/P&gt;
&lt;P&gt;Comment all the 3rd table, reload, check the data. If there is data, you found your issue. If not, keep the 3rd table out and comment the 2nd. Do the same check. If still no data, do that with the first one. If still no data,&amp;nbsp;&lt;SPAN&gt;tech_organizational_main_items is the problem.&lt;BR /&gt;&lt;BR /&gt;When finding the table that is causing the problem. Load that table and&amp;nbsp;tech_organizational_main_items, but comment the left join and exam the subset ration for they key fields between those two. They should be, for both, close or equals to 100%. If the sum of them is 100% or some other strange behavior, you found the problem. Thje tables key fields do not match. Maybe is a data format problem.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2024 21:38:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-data-from-excel-to-fill-Null-fields-in-Qlik/m-p/2445442#M97650</guid>
      <dc:creator>igoralcantara</dc:creator>
      <dc:date>2024-04-26T21:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: Load data from excel to fill Null fields in Qlik</title>
      <link>https://community.qlik.com/t5/App-Development/Load-data-from-excel-to-fill-Null-fields-in-Qlik/m-p/2445447#M97651</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Update:&lt;/P&gt;
&lt;P&gt;I have managed to fill the new fields, which were previously empty by changing the Left Join to&lt;/P&gt;
&lt;DIV&gt;LEFT JOIN ([tech_organizational_main_items]) LOAD&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;[control.id] as [control.id],&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;[Category Number],&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;[Control Number]&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;FROM [lib://Live - DB:DataFiles/ISO 27001_2022 Category Number Mapping - Qlik.csv]&lt;/DIV&gt;
&lt;DIV&gt;(txt, codepage is 28591, embedded labels, delimiter is ',', msq);&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Before this none would load.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Is there a way to add data to the existing Null fields?&lt;/DIV&gt;
&lt;DIV&gt;Thanks&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2024 22:39:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-data-from-excel-to-fill-Null-fields-in-Qlik/m-p/2445447#M97651</guid>
      <dc:creator>Markbhai</dc:creator>
      <dc:date>2024-04-26T22:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: Load data from excel to fill Null fields in Qlik</title>
      <link>https://community.qlik.com/t5/App-Development/Load-data-from-excel-to-fill-Null-fields-in-Qlik/m-p/2445571#M97660</link>
      <description>&lt;P&gt;Without sample data and a preview of your anticipated output, this is purely speculative.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Map_Spreadsheet:
Mapping LOAD "objective.id",
             Objective
               &amp;amp;'|'&amp;amp;
             "Objective Description"
               &amp;amp;'|'&amp;amp;
             "Objective Number"
               &amp;amp;'|'&amp;amp;
             "Control Number"
FROM ... csv;

tech_organizational_main_itemsTmp:
FROM `FROM `db`.`tech_organizational_main_items`;

Left Join(tech_organizational_main_itemsTmp) 
LOAD * `FROM `db`.`tech_organizational_controls`;

Left Join(tech_organizational_main_itemsTmp) 
LOAD * `db`.`tech_organizational_objective`;
 
tech_organizational_main_items:
LOAD *,
If(Len(Trim(Objective))=0,SubField(ApplyMap('Map_Spreadsheet',"objective.id"),'|',1), Objective) as Objective1,
If(Len(Trim("Objective Description"))=0,SubField(ApplyMap('Map_Spreadsheet',"objective.id","Objective Description"),'|',2), "Objective Description") as "Objective Description1",
SubField(ApplyMap('Map_Spreadsheet',"objective.id"),'|',3) as "Objective Number",
SubField(ApplyMap('Map_Spreadsheet',"objective.id"),'|',4) as "Control Number"
Resident [tech_organizational_main_items];

DROP Table tech_organizational_main_itemsTmp; 
DROP fields Objective, Objective Description";
RENAME Fields Objective1 to Objective, Objective Description1 to "Objective Description";&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 27 Apr 2024 11:56:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-data-from-excel-to-fill-Null-fields-in-Qlik/m-p/2445571#M97660</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2024-04-27T11:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Load data from excel to fill Null fields in Qlik</title>
      <link>https://community.qlik.com/t5/App-Development/Load-data-from-excel-to-fill-Null-fields-in-Qlik/m-p/2446092#M97676</link>
      <description>&lt;P&gt;Thanks everyone.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the end I gave up and created and joined the sheet as its own table.&amp;nbsp; not what I wanted, but given the time it was taking I elected to go for this less elegant solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you to everyone for their input.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2024 07:35:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-data-from-excel-to-fill-Null-fields-in-Qlik/m-p/2446092#M97676</guid>
      <dc:creator>Markbhai</dc:creator>
      <dc:date>2024-04-29T07:35:43Z</dc:date>
    </item>
  </channel>
</rss>

