<?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 How to Add 'Missing' Records in Script in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-Add-Missing-Records-in-Script/m-p/1867747#M71657</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Is there a way to achieve the below through scripting (without doing Inline loads)? I need all Names (in Dim1 table) to have records for all PIs (in Dim2 table) in my Fact table. The extra records I want added (bolded text in screenshot) to the new Fact table can just have null values for Value field.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="benvatvandata_0-1638900540306.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/68109iEE98A54FE110A59F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="benvatvandata_0-1638900540306.png" alt="benvatvandata_0-1638900540306.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Please let me know the best method of doing this.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Ben&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 16:53:14 GMT</pubDate>
    <dc:creator>benvatvandata</dc:creator>
    <dc:date>2024-11-16T16:53:14Z</dc:date>
    <item>
      <title>How to Add 'Missing' Records in Script</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-Add-Missing-Records-in-Script/m-p/1867747#M71657</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Is there a way to achieve the below through scripting (without doing Inline loads)? I need all Names (in Dim1 table) to have records for all PIs (in Dim2 table) in my Fact table. The extra records I want added (bolded text in screenshot) to the new Fact table can just have null values for Value field.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="benvatvandata_0-1638900540306.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/68109iEE98A54FE110A59F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="benvatvandata_0-1638900540306.png" alt="benvatvandata_0-1638900540306.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Please let me know the best method of doing this.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Ben&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 16:53:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-Add-Missing-Records-in-Script/m-p/1867747#M71657</guid>
      <dc:creator>benvatvandata</dc:creator>
      <dc:date>2024-11-16T16:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to Add 'Missing' Records in Script</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-Add-Missing-Records-in-Script/m-p/1867778#M71660</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Maybe something like this;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Dim1:
load * inline [
NameFL
abc
def
ghi
];

Dim2:
load * inline [
Pt
1
2
];

Fact:
load * inline [
NameFL, Pt, Value
abc, 1, 5
ghi
];

Join (Dim1)
Load
	*
Resident Dim2;

Outer Join (Dim1)
Load
	*
Resident Fact;

FinalFact:
NoConcatenate
Load * 
Resident Dim1
Where Not IsNull(Pt) and Len(Pt)&amp;gt;0;

DROP TABLES Dim1, Dim2, Fact;&lt;/LI-CODE&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Chris.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 19:28:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-Add-Missing-Records-in-Script/m-p/1867778#M71660</guid>
      <dc:creator>chrismarlow</dc:creator>
      <dc:date>2021-12-07T19:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to Add 'Missing' Records in Script</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-Add-Missing-Records-in-Script/m-p/1869205#M71769</link>
      <description>&lt;P&gt;Hi Chris,&lt;/P&gt;
&lt;P&gt;This does help. Unfortunately, my actual data model is much larger though so it'll be a bit more challenging to implement this. If there's another (or more) Dim tables that need this same process done, can I just replicate this same script with the other Dim tables? For example, let's say Dim3 is a list of TeamNames, and they all need Dim2 values (similar to what we did for Dim1)... exact same process? or will there be complications?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 16:54:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-Add-Missing-Records-in-Script/m-p/1869205#M71769</guid>
      <dc:creator>benvatvandata</dc:creator>
      <dc:date>2021-12-10T16:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to Add 'Missing' Records in Script</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-Add-Missing-Records-in-Script/m-p/1869211#M71770</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Yes, same process should apply you might need to look at the where clause.&lt;/P&gt;
&lt;P&gt;This is doing a cartesian join &amp;amp; then your join back will be a on multiple fields, so I can see the data getting quite big quite quickly .. but &lt;EM&gt;think&lt;/EM&gt; that is unavoidable.&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Chris.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 17:11:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-Add-Missing-Records-in-Script/m-p/1869211#M71770</guid>
      <dc:creator>chrismarlow</dc:creator>
      <dc:date>2021-12-10T17:11:46Z</dc:date>
    </item>
  </channel>
</rss>

