<?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: Re: Re: Combining 2 tables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Combining-2-tables/m-p/590928#M479089</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I played around with you data (actually added some records to tested the different scenarios) and came up with the attached qvw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you find it useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Feb 2014 06:15:48 GMT</pubDate>
    <dc:creator>albertovarela</dc:creator>
    <dc:date>2014-02-17T06:15:48Z</dc:date>
    <item>
      <title>Combining 2 tables</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-2-tables/m-p/590924#M479085</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 work for a Insurance firm where we need to find the Net Incurred losses.&lt;/P&gt;&lt;P&gt;Net Incurred Losses=Claim Amt- Deductible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the deductible has 3 scenarios,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Deductible per claim&lt;/P&gt;&lt;P&gt;2&amp;nbsp; Aggregate deductible per policy&lt;/P&gt;&lt;P&gt;3. Deductible per claim and deductible aggregate at the policy level&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lets say I have 2 tables Claims and Deductible. There are no flags to indicate the deductible per claim or aggregate or both.&lt;/P&gt;&lt;P&gt;The tables are connected by policy number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Deductible per claim.&lt;/P&gt;&lt;P&gt;If the DedPerClaim field is not 0 and DedAggAmt field is 0, then Incurred Loss= Claim Amt- DedPerClaim&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Deductible Aggr&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;If the &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;DedPerClaim field is&amp;nbsp; 0 and DedAggAmt field is not 0, the company will pay any amount after the total claim amount of that policy reaches to the DedAggAmt&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3rd is the complicated scenario of Per claim and Aggregate at the policy level&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached an excel. Can someone please help me on how to script this and show the values in straight table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Feb 2014 19:18:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-2-tables/m-p/590924#M479085</guid>
      <dc:creator />
      <dc:date>2014-02-16T19:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: Combining 2 tables</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-2-tables/m-p/590925#M479086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you clarify the following sentence:&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;"the company will pay any amount after the total claim amount of that policy reaches to the DedAggAmt"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From my understanding you have 2 tables (Claims &amp;amp; Deducitble) and you want to model table 3 in the QV script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Feb 2014 22:23:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-2-tables/m-p/590925#M479086</guid>
      <dc:creator>simondachstr</dc:creator>
      <dc:date>2014-02-16T22:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: Combining 2 tables</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-2-tables/m-p/590926#M479087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Typically the best way to approach these scenarios is to concatenate the tables, giving any common fields exactly the same name.&amp;nbsp; This way you can aggregate values for Claims and Premiums across various dimensions, such as Policy Number, and do the kinds of calculations you are describing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Feb 2014 23:13:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-2-tables/m-p/590926#M479087</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2014-02-16T23:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Combining 2 tables</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-2-tables/m-p/590927#M479088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the replies. A policy can have number of claims. The claimant needs to pay until all of their claims exceed the amount that is stored in the DedAggAmt field. Attaching a test qvw . I added a table that lists all the details and then a chart that implements the Dedperclaim.&lt;/P&gt;&lt;P&gt;But I need to do the grouping for the Policies# 2 and 3 to get the correct value for the Incurred Losses column.&lt;/P&gt;&lt;P&gt;The total claim value for the policy# 2 is 2800 but the Deductible aggregate amount is 3000, meaning the claimant has to pay the first 3000. So the losses will be 0 in this case.&lt;/P&gt;&lt;P&gt;In the 3rd scenario, there is both per claim and aggregate, so 3A and 3B claims will be paid 1500 and 500 and 3C, 3D will be 0 as they did not exceed 500. The total claim value is 3500 so far. But lets say next we receive more claims for the policy 3 and the claim value reaches 5000 then we need to pay out all the claims.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Feb 2014 00:07:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-2-tables/m-p/590927#M479088</guid>
      <dc:creator />
      <dc:date>2014-02-17T00:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Combining 2 tables</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-2-tables/m-p/590928#M479089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I played around with you data (actually added some records to tested the different scenarios) and came up with the attached qvw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you find it useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Feb 2014 06:15:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-2-tables/m-p/590928#M479089</guid>
      <dc:creator>albertovarela</dc:creator>
      <dc:date>2014-02-17T06:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Combining 2 tables</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-2-tables/m-p/590929#M479090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a bunch. This is what I was looking for. I will implement this script into my data model. Will let you know if I have any questions&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Feb 2014 13:45:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-2-tables/m-p/590929#M479090</guid>
      <dc:creator />
      <dc:date>2014-02-17T13:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: Combining 2 tables</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-2-tables/m-p/590930#M479091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alberto,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to add this into my model and I cannot get it work (script takes longer to load than usual and I see duplicates in claims) because of other fact tables and calculations involved. Not sure how to troubleshoot and I am fairly new to QV.&lt;/P&gt;&lt;P&gt;Thank you. Your help is much appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 00:56:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-2-tables/m-p/590930#M479091</guid>
      <dc:creator />
      <dc:date>2014-02-18T00:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: Combining 2 tables</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-2-tables/m-p/590931#M479092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I sent you message...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 05:46:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-2-tables/m-p/590931#M479092</guid>
      <dc:creator>albertovarela</dc:creator>
      <dc:date>2014-02-18T05:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: Combining 2 tables</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-2-tables/m-p/590932#M479093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to be really careful when using JOINs in load scripts as if there is a one to many join then rows (and values) will be duplicated.&amp;nbsp; A concatenate removes this risk.&amp;nbsp; It should be possible to then do the calculations you require in the front end - but I have not tried this out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 08:40:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-2-tables/m-p/590932#M479093</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2014-02-18T08:40:14Z</dc:date>
    </item>
  </channel>
</rss>

