<?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 Seeking best practice for joining (multiple key?) tables. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Seeking-best-practice-for-joining-multiple-key-tables/m-p/428606#M1158807</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First let me apologize in advance for my inaccurate terminology, I'm not a DB person.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That said, here's what I'm trying to accomplish and I would appreciate some experienced best-practice feedback.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 2 tables, a "call fact" table that records phone calls and an FAQ table that records a list of automated FAQs that were played to the caller. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The tables look something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call Fact:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" height="99" style="width: 562px; height: 101px; border-width: 1px; border-color: #000000; border-style: solid;" width="560"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Call ID&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Call Count&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;FAQ key&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="center"&gt;ABC&lt;/TD&gt;&lt;TD align="center"&gt;1&lt;/TD&gt;&lt;TD align="center"&gt;123&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="center"&gt;DEF&lt;/TD&gt;&lt;TD align="center"&gt;1&lt;/TD&gt;&lt;TD align="center"&gt;456&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FAQ Table (I believe the ID is auto-generated, thus allowing a single call above to link to multiple FAQs)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" height="87" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); height: 85px; width: 559px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;FAQ Key&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;ID&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;FAQ Name&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="center" style="null;"&gt;123&lt;/TD&gt;&lt;TD align="center" style="null;"&gt;1&lt;/TD&gt;&lt;TD align="center" style="null;"&gt;Store Location FAQ&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="center"&gt;456&lt;/TD&gt;&lt;TD align="center"&gt;2&lt;/TD&gt;&lt;TD align="center"&gt;Store Location FAQ&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="center"&gt;456&lt;/TD&gt;&lt;TD align="center"&gt;3&lt;/TD&gt;&lt;TD align="center"&gt;Store Hours FAQ&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I ultimately want to be able to do is create a chart which displays total number of calls for each distinct FAQ Name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now I'm using a "straight forward" join of the two tables, that seems to be okay. However I am having a little trouble with the&lt;/P&gt;&lt;P&gt;chart which makes me think maybe there's a more appropriate way to join the tables. The "trouble" I'm having is that I created a&lt;/P&gt;&lt;P&gt;chart with a dimension of [FAQ Name], and expected that I could just use =sum([Call Count]) as the expression. However if I &lt;/P&gt;&lt;P&gt;want the numbers to come out correctly, I have to use =count(DISTINCT [Call ID]) which, I believe, is not as efficient as sum([Call Count])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So question 1 is what is the best way to join these tables in my data model? &lt;/P&gt;&lt;P&gt;And question 2 is, what is the best dimension/expression for me to chart the desired metric?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Feb 2013 14:14:47 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-02-12T14:14:47Z</dc:date>
    <item>
      <title>Seeking best practice for joining (multiple key?) tables.</title>
      <link>https://community.qlik.com/t5/QlikView/Seeking-best-practice-for-joining-multiple-key-tables/m-p/428606#M1158807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First let me apologize in advance for my inaccurate terminology, I'm not a DB person.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That said, here's what I'm trying to accomplish and I would appreciate some experienced best-practice feedback.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 2 tables, a "call fact" table that records phone calls and an FAQ table that records a list of automated FAQs that were played to the caller. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The tables look something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call Fact:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" height="99" style="width: 562px; height: 101px; border-width: 1px; border-color: #000000; border-style: solid;" width="560"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Call ID&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Call Count&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;FAQ key&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="center"&gt;ABC&lt;/TD&gt;&lt;TD align="center"&gt;1&lt;/TD&gt;&lt;TD align="center"&gt;123&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="center"&gt;DEF&lt;/TD&gt;&lt;TD align="center"&gt;1&lt;/TD&gt;&lt;TD align="center"&gt;456&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FAQ Table (I believe the ID is auto-generated, thus allowing a single call above to link to multiple FAQs)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" height="87" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); height: 85px; width: 559px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;FAQ Key&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;ID&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;FAQ Name&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="center" style="null;"&gt;123&lt;/TD&gt;&lt;TD align="center" style="null;"&gt;1&lt;/TD&gt;&lt;TD align="center" style="null;"&gt;Store Location FAQ&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="center"&gt;456&lt;/TD&gt;&lt;TD align="center"&gt;2&lt;/TD&gt;&lt;TD align="center"&gt;Store Location FAQ&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="center"&gt;456&lt;/TD&gt;&lt;TD align="center"&gt;3&lt;/TD&gt;&lt;TD align="center"&gt;Store Hours FAQ&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I ultimately want to be able to do is create a chart which displays total number of calls for each distinct FAQ Name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now I'm using a "straight forward" join of the two tables, that seems to be okay. However I am having a little trouble with the&lt;/P&gt;&lt;P&gt;chart which makes me think maybe there's a more appropriate way to join the tables. The "trouble" I'm having is that I created a&lt;/P&gt;&lt;P&gt;chart with a dimension of [FAQ Name], and expected that I could just use =sum([Call Count]) as the expression. However if I &lt;/P&gt;&lt;P&gt;want the numbers to come out correctly, I have to use =count(DISTINCT [Call ID]) which, I believe, is not as efficient as sum([Call Count])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So question 1 is what is the best way to join these tables in my data model? &lt;/P&gt;&lt;P&gt;And question 2 is, what is the best dimension/expression for me to chart the desired metric?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Feb 2013 14:14:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Seeking-best-practice-for-joining-multiple-key-tables/m-p/428606#M1158807</guid>
      <dc:creator />
      <dc:date>2013-02-12T14:14:47Z</dc:date>
    </item>
  </channel>
</rss>

