<?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: Calculating 2 Tables with Multiple Many to Many Relationships in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculating-2-Tables-with-Multiple-Many-to-Many-Relationships/m-p/462331#M484146</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I won't be able to help you with doing this in set analysis but typically in a Data warehouse with a many to many table query issue,&amp;nbsp; you need a driving table between the two tables to ease the join to get the results you expect.&amp;nbsp; I would suggest structuring the data to satisfy the reporting requirement in the load.&amp;nbsp; that would also simplify the set analysis.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my .02$&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Jun 2013 18:41:01 GMT</pubDate>
    <dc:creator>Tony_Strano</dc:creator>
    <dc:date>2013-06-11T18:41:01Z</dc:date>
    <item>
      <title>Calculating 2 Tables with Multiple Many to Many Relationships</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-2-Tables-with-Multiple-Many-to-Many-Relationships/m-p/462330#M484145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am perplexed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 2 data tables: &lt;/P&gt;&lt;UL&gt;&lt;LI&gt;One that tracks shipments for Parts, Customers and by Quarter, &lt;/LI&gt;&lt;LI&gt;The other tracks returns for a Part, Customer by Quarter. Additionall there is a Point of Failure (POF) and Failure Mechanism (FM)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The 2 tables are joined by these 3 fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to calculate the return rates in Parts per Million PPM = (Returned/Shipped)*1000000. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where I run into issues is calculating PPM for a given Customer or Part by POF and/or FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What want to get is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" height="108" style="BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid; WIDTH: 401px; HEIGHT: 110px; BORDER-TOP: #000000 1px solid; BORDER-RIGHT: #000000 1px solid;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; font-family: Arial; color: #333333; padding: 3px;"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Customer&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; font-family: Arial; color: #333333; padding: 3px;"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;POF&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; font-family: Arial; color: #333333; padding: 3px;"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Volume&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; font-family: Arial; color: #333333; padding: 3px;"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Retunred&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; font-family: Arial; color: #333333; padding: 3px;"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;PPM&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;Customer 1&lt;/TD&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;FIeld&lt;/TD&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;1,000,000&lt;/TD&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;1&lt;/TD&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;Customer 1&lt;/TD&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;Production&lt;/TD&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;1,000,000&lt;/TD&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;2&lt;/TD&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;Customer 1&lt;/TD&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;0km&lt;/TD&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;1,000,000&lt;/TD&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;&lt;/TD&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I get is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" height="108" style="width: 401px; height: 110px; border: #000000 1px solid;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; font-family: Arial; color: #333333; padding: 3px;"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Customer&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; font-family: Arial; color: #333333; padding: 3px;"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;POF&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; font-family: Arial; color: #333333; padding: 3px;"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Volume&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; font-family: Arial; color: #333333; padding: 3px;"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Retunred&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; font-family: Arial; color: #333333; padding: 3px;"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;PPM&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;Customer 1&lt;/TD&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;FIeld&lt;/TD&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;1,000,000&lt;/TD&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;1&lt;/TD&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;Customer 1&lt;/TD&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;Production&lt;/TD&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;1,000,000&lt;/TD&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;2&lt;/TD&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;Customer 1&lt;/TD&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;0km&lt;/TD&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;&lt;/TD&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;&lt;/TD&gt;&lt;TD style="text-align: left; background-color: transparent; color: #000000; padding: 3px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can not come up with a correct Set Analysis where by it will give be back the total volume for the customer unless there is a value for the POF. This is a simplified version and the acutal data, where I get differing values for Volume (which should reman constant) depending on the number of returns......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you fo any thoughts anyone might have.......... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jun 2013 17:57:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-2-Tables-with-Multiple-Many-to-Many-Relationships/m-p/462330#M484145</guid>
      <dc:creator />
      <dc:date>2013-06-11T17:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating 2 Tables with Multiple Many to Many Relationships</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-2-Tables-with-Multiple-Many-to-Many-Relationships/m-p/462331#M484146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I won't be able to help you with doing this in set analysis but typically in a Data warehouse with a many to many table query issue,&amp;nbsp; you need a driving table between the two tables to ease the join to get the results you expect.&amp;nbsp; I would suggest structuring the data to satisfy the reporting requirement in the load.&amp;nbsp; that would also simplify the set analysis.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my .02$&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jun 2013 18:41:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-2-Tables-with-Multiple-Many-to-Many-Relationships/m-p/462331#M484146</guid>
      <dc:creator>Tony_Strano</dc:creator>
      <dc:date>2013-06-11T18:41:01Z</dc:date>
    </item>
  </channel>
</rss>

