<?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 Handling multiple fact tables... in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Handling-multiple-fact-tables/m-p/507184#M189667</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0 0 1em; font-size: 13.333333969116211px; color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px;"&gt;I have a PostgreSQL database containing various education data such school-level test scores and enrollment figures. I need to separate enrollment from test scores because the data is on different grains. Even though enrollment is on a different granularity from the test-score data, many of the dimensions are the same. For example, I have:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="_jivemacro_uid_13770088801462735 jive_text_macro jive_macro_code" jivemacro_uid="_13770088801462735" modifiedtitle="true"&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ~ ---------------------------------------------------------------------------------~&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Test Scores Fact&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; |-------------|-----------|----------|-----------|--------------|------------|-----|&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; | school_code | test_code | grade_id | gender_id | ethnicity_id | subject_id | ... |&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; |-------------|-----------|----------|-----------|--------------|------------|-----|&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ~ --------------------------------------------------------~&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Enrollment Fact&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; |-------------|----------|-----------|--------------|-----|&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; | school_code | grade_id | gender_id | ethnicity_id | ... |&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; |-------------|----------|-----------|--------------|-----|&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; |-------------|----------|-----------|--------------|-----|&lt;/P&gt;
&lt;/PRE&gt;&lt;P style="margin: 0 0 1em; font-size: 13.333333969116211px; color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px;"&gt;&lt;/P&gt;&lt;P style="margin: 0 0 1em; font-size: 13.333333969116211px; color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px;"&gt;This structure is fine on the backend, but in Qlikview, this creates a synthetic key. The solution for synthetic keys seems to usually be replacing it with a link table via Qlikview scripting, which has been my approach as well. But this does not seem to scale, as when I add a third fact table (on yet another grain) that contains more of the same dimensions, if I create another link table, now my two link tables start to associate as they contain several commonly named fields, and Qlikview's response is to create more synthetic keys?&lt;/P&gt;&lt;P style="margin: 0 0 1em; font-size: 13.333333969116211px; color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px;"&gt;I'm relatively new to Qlikview and am working by myself. How are multiple facts of different grains with common dimensions usually handled?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Aug 2013 14:35:30 GMT</pubDate>
    <dc:creator>bdiamante</dc:creator>
    <dc:date>2013-08-20T14:35:30Z</dc:date>
    <item>
      <title>Handling multiple fact tables...</title>
      <link>https://community.qlik.com/t5/QlikView/Handling-multiple-fact-tables/m-p/507184#M189667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0 0 1em; font-size: 13.333333969116211px; color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px;"&gt;I have a PostgreSQL database containing various education data such school-level test scores and enrollment figures. I need to separate enrollment from test scores because the data is on different grains. Even though enrollment is on a different granularity from the test-score data, many of the dimensions are the same. For example, I have:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="_jivemacro_uid_13770088801462735 jive_text_macro jive_macro_code" jivemacro_uid="_13770088801462735" modifiedtitle="true"&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ~ ---------------------------------------------------------------------------------~&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Test Scores Fact&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; |-------------|-----------|----------|-----------|--------------|------------|-----|&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; | school_code | test_code | grade_id | gender_id | ethnicity_id | subject_id | ... |&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; |-------------|-----------|----------|-----------|--------------|------------|-----|&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ~ --------------------------------------------------------~&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Enrollment Fact&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; |-------------|----------|-----------|--------------|-----|&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; | school_code | grade_id | gender_id | ethnicity_id | ... |&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; |-------------|----------|-----------|--------------|-----|&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; |-------------|----------|-----------|--------------|-----|&lt;/P&gt;
&lt;/PRE&gt;&lt;P style="margin: 0 0 1em; font-size: 13.333333969116211px; color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px;"&gt;&lt;/P&gt;&lt;P style="margin: 0 0 1em; font-size: 13.333333969116211px; color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px;"&gt;This structure is fine on the backend, but in Qlikview, this creates a synthetic key. The solution for synthetic keys seems to usually be replacing it with a link table via Qlikview scripting, which has been my approach as well. But this does not seem to scale, as when I add a third fact table (on yet another grain) that contains more of the same dimensions, if I create another link table, now my two link tables start to associate as they contain several commonly named fields, and Qlikview's response is to create more synthetic keys?&lt;/P&gt;&lt;P style="margin: 0 0 1em; font-size: 13.333333969116211px; color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px;"&gt;I'm relatively new to Qlikview and am working by myself. How are multiple facts of different grains with common dimensions usually handled?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 14:35:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Handling-multiple-fact-tables/m-p/507184#M189667</guid>
      <dc:creator>bdiamante</dc:creator>
      <dc:date>2013-08-20T14:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: Handling multiple fact tables...</title>
      <link>https://community.qlik.com/t5/QlikView/Handling-multiple-fact-tables/m-p/507185#M189668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Brian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a very common question and you should find lots of similar threads in here.&amp;nbsp; The usual solution is to concatenate the fact tables together (i.e. stack them on top of one another in a single fact table). You would most likely want to add a field called something like Fact_Type, or Source or something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 15:45:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Handling-multiple-fact-tables/m-p/507185#M189668</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2013-08-20T15:45:30Z</dc:date>
    </item>
  </channel>
</rss>

