<?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 One-to-many join, duplicate sum values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/One-to-many-join-duplicate-sum-values/m-p/151144#M29055</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;Hello&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;I have two files, the first with unique claim number (one record per claim) and cost, and the second with non-unique claim numbers (possibly many records per claim) and a code. When I load them in to QV and sum the cost by claim number, the values are multiplied up by the number of duplicates on the second file. For example:&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;status:&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;load * inline [&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;claim, cost&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;A, 100&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;B, 150&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;C, 120&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;D, 90&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;];&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;status2:&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;LEFT JOIN load* inline [&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;claim, rule&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;A, 1&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;B, 1&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;B, 2&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;C, 1&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;D, 2&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;D, 3];&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;In this example if you create a table to sum cost by claim B comes out as 300 and D as 180.&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;How do I resolve this?&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;Many thanks!&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Aug 2009 21:19:03 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-08-05T21:19:03Z</dc:date>
    <item>
      <title>One-to-many join, duplicate sum values</title>
      <link>https://community.qlik.com/t5/QlikView/One-to-many-join-duplicate-sum-values/m-p/151144#M29055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;Hello&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;I have two files, the first with unique claim number (one record per claim) and cost, and the second with non-unique claim numbers (possibly many records per claim) and a code. When I load them in to QV and sum the cost by claim number, the values are multiplied up by the number of duplicates on the second file. For example:&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;status:&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;load * inline [&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;claim, cost&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;A, 100&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;B, 150&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;C, 120&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;D, 90&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;];&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;status2:&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;LEFT JOIN load* inline [&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;claim, rule&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;A, 1&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;B, 1&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;B, 2&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;C, 1&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;D, 2&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;D, 3];&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;In this example if you create a table to sum cost by claim B comes out as 300 and D as 180.&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;How do I resolve this?&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;Many thanks!&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2009 21:19:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/One-to-many-join-duplicate-sum-values/m-p/151144#M29055</guid>
      <dc:creator />
      <dc:date>2009-08-05T21:19:03Z</dc:date>
    </item>
  </channel>
</rss>

