<?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: Interval Match &amp;quot;Loop&amp;quot; error in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Interval-Match-quot-Loop-quot-error/m-p/83504#M606955</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for this, Giovanne! I have an additional question, if you are able to answer: &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;If there is an additional LineID in the Pricing table, how do I join that in to the Orders table? I tried: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Left Join (Cases) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;LOAD StartDate, EndDate, ContractID, LineID as PricingLineID &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Resident Pricing; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;But that resulted in duplication of records. &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 May 2018 20:01:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-05-30T20:01:38Z</dc:date>
    <item>
      <title>Interval Match "Loop" error</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-Match-quot-Loop-quot-error/m-p/83501#M606952</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 am trying to associate our sales data with pricing info based on contract. Each order has a payer which uniquely maps to a contract, but each contract can have multiple payment terms which change over time. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script looks like this: &lt;/P&gt;&lt;P&gt;Pricing:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;LOAD &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ContractID, StartDate, EndDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Orders:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;OrderID, PayerID, `Date of Service`&lt;/P&gt;&lt;P&gt;LEFT JOIN&lt;/P&gt;&lt;P&gt;LOAD PayerID, ContractID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With just the above, contract lines are linked to orders in a many-to-one way, because each contract can have multiple lines covering disjoint date periods. To get this down to one-to-one, my understanding is that I should use an IntervalMatch to associate the tables like so: &lt;/P&gt;&lt;P&gt;Match:&lt;/P&gt;&lt;P&gt;IntervalMatch([Date of Service]) LOAD&lt;/P&gt;&lt;P&gt;StartDate, EndDate&lt;/P&gt;&lt;P&gt;Resident Pricing;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I get the following warning: "One or more loops have been detected in your database structure. Loops may cause ambiguous results and should therefore be avoided. Loop(s) will be cut by setting one or more tables as loosely coupled."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My data then has the attached diagram, and the association between contracts and orders remains many-to-one. Any idea how I can get a one-to-one link between Pricing and Orders tables based on both the ContractID and (Date of Service between StartDate and EndDate)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2018 19:53:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-Match-quot-Loop-quot-error/m-p/83501#M606952</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-23T19:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: Interval Match "Loop" error</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-Match-quot-Loop-quot-error/m-p/83502#M606953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;left join(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Orders)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;IntervalMatch([Date of Service]) LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;StartDate, EndDate&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Resident Pricing;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2018 19:57:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-Match-quot-Loop-quot-error/m-p/83502#M606953</guid>
      <dc:creator>giovanneb</dc:creator>
      <dc:date>2018-05-23T19:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: Interval Match "Loop" error</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-Match-quot-Loop-quot-error/m-p/83503#M606954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;appart from the loop error, isn't there a field missing in your intervalmatch function? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a Date must match to an Interval between a Start and End Date, but shouldn't there be some kind of additional field (contractID?) in the matching process &lt;/P&gt;&lt;P&gt;(you match a Date of a contract to a pricing for that contract)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unless of course you apply same pricing to all contracts at the same moment in time? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;afterwards, ensure correct field naming to avoid associations where you don't want them...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2018 20:04:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-Match-quot-Loop-quot-error/m-p/83503#M606954</guid>
      <dc:creator>mikaelsc</dc:creator>
      <dc:date>2018-05-23T20:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Interval Match "Loop" error</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-Match-quot-Loop-quot-error/m-p/83504#M606955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for this, Giovanne! I have an additional question, if you are able to answer: &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;If there is an additional LineID in the Pricing table, how do I join that in to the Orders table? I tried: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Left Join (Cases) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;LOAD StartDate, EndDate, ContractID, LineID as PricingLineID &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Resident Pricing; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;But that resulted in duplication of records. &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2018 20:01:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-Match-quot-Loop-quot-error/m-p/83504#M606955</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-30T20:01:38Z</dc:date>
    </item>
  </channel>
</rss>

