<?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 Dealing with two fact granularities - Dimensional Model in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Dealing-with-two-fact-granularities-Dimensional-Model/m-p/63995#M604697</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question about creating a dimensional model and dealing with different levels of granularity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to know which out of these two approaches would be best and why.&amp;nbsp; Or if there is another approach which would be even better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The scenario I'm usinging is simple:&amp;nbsp; I have 2 dimensions, Region and Customer and 1 fact, Sales.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This becomes two dimension tables, one for region and another for customer with a fact table containing sales looking like so:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="No Aggr.PNG" class="jive-image image-1" height="327" src="/legacyfs/online/200249_No Aggr.PNG" style="width: 515.17px; height: 327px;" width="515" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to aggregate the sales by region.&amp;nbsp; But I'm not sure which is the best approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I aggregate the sales by region and then join the data onto the fact table so the the model looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Fact Join.PNG" class="jive-image image-2" height="336" src="/legacyfs/online/200250_Fact Join.PNG" style="width: 513px; height: 336.1px;" width="513" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or should I create a new table which holds the aggregated values with a key joining back to the fact and region dimension table which would look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2nd Fact.PNG" class="jive-image image-3" height="284" src="/legacyfs/online/200251_2nd Fact.PNG" style="width: 511px; height: 284.34px;" width="511" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or is there another approach which beats these two?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your wisdom and input is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Apr 2018 16:15:23 GMT</pubDate>
    <dc:creator>tom2qlik</dc:creator>
    <dc:date>2018-04-19T16:15:23Z</dc:date>
    <item>
      <title>Dealing with two fact granularities - Dimensional Model</title>
      <link>https://community.qlik.com/t5/QlikView/Dealing-with-two-fact-granularities-Dimensional-Model/m-p/63995#M604697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question about creating a dimensional model and dealing with different levels of granularity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to know which out of these two approaches would be best and why.&amp;nbsp; Or if there is another approach which would be even better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The scenario I'm usinging is simple:&amp;nbsp; I have 2 dimensions, Region and Customer and 1 fact, Sales.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This becomes two dimension tables, one for region and another for customer with a fact table containing sales looking like so:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="No Aggr.PNG" class="jive-image image-1" height="327" src="/legacyfs/online/200249_No Aggr.PNG" style="width: 515.17px; height: 327px;" width="515" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to aggregate the sales by region.&amp;nbsp; But I'm not sure which is the best approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I aggregate the sales by region and then join the data onto the fact table so the the model looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Fact Join.PNG" class="jive-image image-2" height="336" src="/legacyfs/online/200250_Fact Join.PNG" style="width: 513px; height: 336.1px;" width="513" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or should I create a new table which holds the aggregated values with a key joining back to the fact and region dimension table which would look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2nd Fact.PNG" class="jive-image image-3" height="284" src="/legacyfs/online/200251_2nd Fact.PNG" style="width: 511px; height: 284.34px;" width="511" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or is there another approach which beats these two?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your wisdom and input is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2018 16:15:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dealing-with-two-fact-granularities-Dimensional-Model/m-p/63995#M604697</guid>
      <dc:creator>tom2qlik</dc:creator>
      <dc:date>2018-04-19T16:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with two fact granularities - Dimensional Model</title>
      <link>https://community.qlik.com/t5/QlikView/Dealing-with-two-fact-granularities-Dimensional-Model/m-p/63996#M604698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Now I want to aggregate the sales by region.&amp;nbsp; But I'm not sure which is the best approach.&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Use Region as a dimension in table or chart in the front end and sum(Sales) as expression. Don't change the data model. One fact table with two dimension tables is perfectly fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2018 17:00:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dealing-with-two-fact-granularities-Dimensional-Model/m-p/63996#M604698</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2018-04-19T17:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with two fact granularities - Dimensional Model</title>
      <link>https://community.qlik.com/t5/QlikView/Dealing-with-two-fact-granularities-Dimensional-Model/m-p/63997#M604699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have thought about doing it that way but in a complex data model with far more records would calculating the aggregation in the script not have better performance doing the calculation in a chart?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2018 08:42:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dealing-with-two-fact-granularities-Dimensional-Model/m-p/63997#M604699</guid>
      <dc:creator>tom2qlik</dc:creator>
      <dc:date>2018-04-20T08:42:44Z</dc:date>
    </item>
  </channel>
</rss>

