<?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: Adding missing values to a dimension table from fact table in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Adding-missing-values-to-a-dimension-table-from-fact-table/m-p/2491786#M102110</link>
    <description>&lt;P&gt;Thanks. I feel bad that you both posted the solution at the same time. I was definitely making it more complicated than it needed to be.&lt;/P&gt;</description>
    <pubDate>Fri, 08 Nov 2024 16:43:30 GMT</pubDate>
    <dc:creator>datagrrl</dc:creator>
    <dc:date>2024-11-08T16:43:30Z</dc:date>
    <item>
      <title>Adding missing values to a dimension table from fact table</title>
      <link>https://community.qlik.com/t5/App-Development/Adding-missing-values-to-a-dimension-table-from-fact-table/m-p/2491759#M102099</link>
      <description>&lt;P&gt;I have a situation where my User Dimension is basically internal contacts, but external contact records are also in my fact table.&lt;BR /&gt;I want to add values from the fact table that are missing from the dimension table so that I will have a complete User Dimension. The Title for my external user would be something like 'Outside Sales'.&lt;BR /&gt;I included a Dummy App. I feel like this is easier than I am making it. I have tried a couple things with join and concatenate and I end up getting the wrong results.&lt;BR /&gt;Any assistance is appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="datagrrl_0-1731079352642.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/174102i854D21EEC46456AC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="datagrrl_0-1731079352642.png" alt="datagrrl_0-1731079352642.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="datagrrl_1-1731079389837.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/174103iF534A10F9E891B4D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="datagrrl_1-1731079389837.png" alt="datagrrl_1-1731079389837.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 16:32:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Adding-missing-values-to-a-dimension-table-from-fact-table/m-p/2491759#M102099</guid>
      <dc:creator>datagrrl</dc:creator>
      <dc:date>2024-11-08T16:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: Adding missing values to a dimension table from fact table</title>
      <link>https://community.qlik.com/t5/App-Development/Adding-missing-values-to-a-dimension-table-from-fact-table/m-p/2491767#M102100</link>
      <description>&lt;P&gt;unfortunately i cannot open your file.&lt;/P&gt;
&lt;P&gt;did you already concatenate both the fields ?while appending, create another field called 'tab' and assign 1 and 2 for table1 and table2 . once appended, you could do a pick(match()) or an if() to get what you need on the UI.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 15:52:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Adding-missing-values-to-a-dimension-table-from-fact-table/m-p/2491767#M102100</guid>
      <dc:creator>Qrishna</dc:creator>
      <dc:date>2024-11-08T15:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: Adding missing values to a dimension table from fact table</title>
      <link>https://community.qlik.com/t5/App-Development/Adding-missing-values-to-a-dimension-table-from-fact-table/m-p/2491770#M102101</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/45257"&gt;@datagrrl&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Try something like this :&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Dimension:
LOAD
UserID,
Title
FROM DIMENSION_TABLE;

LOAD
UserID,
'Outside sales' as Title
FROM FACT_TABLE
WHERE NOT EXISTS(UserID)
;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;Regards.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 15:57:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Adding-missing-values-to-a-dimension-table-from-fact-table/m-p/2491770#M102101</guid>
      <dc:creator>sbaro_bd</dc:creator>
      <dc:date>2024-11-08T15:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: Adding missing values to a dimension table from fact table</title>
      <link>https://community.qlik.com/t5/App-Development/Adding-missing-values-to-a-dimension-table-from-fact-table/m-p/2491771#M102102</link>
      <description>&lt;P&gt;Okay, the table 1 and table 2 think makes a little sense.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do I avoid duplicating the records from the dimension though when I load the records from the fact? Should I do some kind of join and add an exists clause? That is the part I am struggling with.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;UserDim:&lt;BR /&gt;Load *,'Table1' as Tab&lt;BR /&gt;Resident User;&lt;/P&gt;
&lt;P&gt;Concatenate(UserDim)&lt;BR /&gt;Load Distinct UserID,'Table2' as Tab, 'Outside Sales' as Title&lt;BR /&gt;Resident Fact;&lt;/P&gt;
&lt;P&gt;Drop Table User&lt;/P&gt;
&lt;P&gt;I end up with Duplicates of the values that existed in the User Dimension.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="datagrrl_0-1731081973724.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/174106i9ECBB25E551D0BD2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="datagrrl_0-1731081973724.png" alt="datagrrl_0-1731081973724.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I really do not want to do any work in the UI. I just want to add the missing values to the user dimension. I already have a lot of data and don't want to do any more calculations in the UI.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do think you might have lead me down the right path though and I can remove the duplicate records in another step. Again, I think I am making this more complicated than it needs to be.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 16:19:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Adding-missing-values-to-a-dimension-table-from-fact-table/m-p/2491771#M102102</guid>
      <dc:creator>datagrrl</dc:creator>
      <dc:date>2024-11-08T16:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: Adding missing values to a dimension table from fact table</title>
      <link>https://community.qlik.com/t5/App-Development/Adding-missing-values-to-a-dimension-table-from-fact-table/m-p/2491775#M102105</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/45257"&gt;@datagrrl&lt;/a&gt;&amp;nbsp;, if you take a close look on my response, add a &lt;STRONG&gt;WHERE NOT EXISTS()&lt;/STRONG&gt; statement on the second part of script.&lt;/P&gt;
&lt;P&gt;Regards.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 16:12:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Adding-missing-values-to-a-dimension-table-from-fact-table/m-p/2491775#M102105</guid>
      <dc:creator>sbaro_bd</dc:creator>
      <dc:date>2024-11-08T16:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: Adding missing values to a dimension table from fact table</title>
      <link>https://community.qlik.com/t5/App-Development/Adding-missing-values-to-a-dimension-table-from-fact-table/m-p/2491778#M102106</link>
      <description>&lt;P&gt;This doesn't make sense to me.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Load Distinct UserID,'Outside Sales' as Title&lt;BR /&gt;Resident Fact&lt;BR /&gt;Where NOT EXISTS(UserID);&lt;/P&gt;
&lt;P&gt;I do this and just end up with the same records that were in the User table in the first place.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 16:16:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Adding-missing-values-to-a-dimension-table-from-fact-table/m-p/2491778#M102106</guid>
      <dc:creator>datagrrl</dc:creator>
      <dc:date>2024-11-08T16:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: Adding missing values to a dimension table from fact table</title>
      <link>https://community.qlik.com/t5/App-Development/Adding-missing-values-to-a-dimension-table-from-fact-table/m-p/2491781#M102107</link>
      <description>&lt;P&gt;The EXISTS() take a lookup on your previous charged tables! You're using the resident statements, that means all UserId records already exists on previous tables. Try something like this :&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;UserDim:
Load *,
'Table1' as Tab,
UserId as KEY
Resident User;

Concatenate(UserDim)

Load Distinct 
UserID,'Table2' as Tab, 
UserId as KEY
'Outside Sales' as Title
Resident Fact
where not exists(KEY, UserId);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 16:26:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Adding-missing-values-to-a-dimension-table-from-fact-table/m-p/2491781#M102107</guid>
      <dc:creator>sbaro_bd</dc:creator>
      <dc:date>2024-11-08T16:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: Adding missing values to a dimension table from fact table</title>
      <link>https://community.qlik.com/t5/App-Development/Adding-missing-values-to-a-dimension-table-from-fact-table/m-p/2491782#M102108</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/45257"&gt;@datagrrl&lt;/a&gt;&amp;nbsp; see the attached&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 16:33:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Adding-missing-values-to-a-dimension-table-from-fact-table/m-p/2491782#M102108</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2024-11-08T16:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: Adding missing values to a dimension table from fact table</title>
      <link>https://community.qlik.com/t5/App-Development/Adding-missing-values-to-a-dimension-table-from-fact-table/m-p/2491783#M102109</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;User:&lt;BR /&gt;Load * Inline [&lt;BR /&gt;UserID, Title&lt;BR /&gt;ABC, Salesperson&lt;BR /&gt;DEF, Salesperson&lt;BR /&gt;BUR, Salesperson&lt;BR /&gt;JKL, Salesperson&lt;BR /&gt;FDR, Salesperson&lt;BR /&gt;QRS, Salesperson&lt;BR /&gt;TUV, Salesperson];&lt;/P&gt;
&lt;P&gt;Fact:&lt;BR /&gt;Load * Inline [&lt;BR /&gt;UserID, Date, Value&lt;BR /&gt;ABC, 5/27/2022, 98&lt;BR /&gt;DEF, 4/27/2021, 41&lt;BR /&gt;BUR, 7/30/2022, 57&lt;BR /&gt;Thomas, 11/11/2020, 33&lt;BR /&gt;Jane, 2/18/2022, 48&lt;BR /&gt;ABC, 7/31/2021, 83&lt;BR /&gt;DEF, 6/26/2020, 74&lt;BR /&gt;BUR, 7/22/2020, 100&lt;BR /&gt;JKL, 12/4/2022, 100&lt;BR /&gt;FDR, 2/24/2021, 24&lt;BR /&gt;Palace, 10/6/2022, 92&lt;BR /&gt;QRS, 12/4/2020, 84&lt;BR /&gt;TUV, 8/29/2020, 69&lt;BR /&gt;Ranch, 6/21/2021, 1&lt;BR /&gt;Desert, 9/24/2022, 37&lt;BR /&gt;ABC, 7/16/2021, 98&lt;BR /&gt;DEF, 12/2/2022, 33&lt;BR /&gt;BUR, 9/10/2022, 14&lt;BR /&gt;JKL, 10/22/2021, 48&lt;BR /&gt;FDR, 3/4/2021, 39&lt;BR /&gt;QRS, 11/16/2021, 92&lt;BR /&gt;TUV, 8/3/2021, 48];&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Tmp:&lt;BR /&gt;NOCONCATENATE Load Distinct UserID as NewUserID Resident User;&lt;/P&gt;
&lt;P&gt;CONCATENATE (User)&lt;BR /&gt;load Distinct UserID, 'Outside sales' as Title&lt;BR /&gt;Resident Fact&lt;BR /&gt;where not exists(NewUserID, UserID);&lt;/P&gt;
&lt;P&gt;drop table Tmp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 16:33:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Adding-missing-values-to-a-dimension-table-from-fact-table/m-p/2491783#M102109</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2024-11-08T16:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: Adding missing values to a dimension table from fact table</title>
      <link>https://community.qlik.com/t5/App-Development/Adding-missing-values-to-a-dimension-table-from-fact-table/m-p/2491786#M102110</link>
      <description>&lt;P&gt;Thanks. I feel bad that you both posted the solution at the same time. I was definitely making it more complicated than it needed to be.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 16:43:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Adding-missing-values-to-a-dimension-table-from-fact-table/m-p/2491786#M102110</guid>
      <dc:creator>datagrrl</dc:creator>
      <dc:date>2024-11-08T16:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: Adding missing values to a dimension table from fact table</title>
      <link>https://community.qlik.com/t5/App-Development/Adding-missing-values-to-a-dimension-table-from-fact-table/m-p/2491787#M102111</link>
      <description>&lt;P&gt;I tried to mark both as the solution since you posted at the same time. Thanks for the help.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 16:44:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Adding-missing-values-to-a-dimension-table-from-fact-table/m-p/2491787#M102111</guid>
      <dc:creator>datagrrl</dc:creator>
      <dc:date>2024-11-08T16:44:13Z</dc:date>
    </item>
  </channel>
</rss>

