<?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: IntervalMatch (Extended Syntax) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/IntervalMatch-Extended-Syntax/m-p/1225146#M624338</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your script to the while-part looked ok. but if I understand you right you made afterwards still the intervalmatch? If yes this needs to be removed. Further your field Kundekontrakt must be the correct key between Dates and Produktbytte - if not you need to add further fields as a combined key maybe within an autonumber().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general this kind of datamodelling (while-loops and intervalmatch) creates big tables - that's normal and expected but it could be too much for an application in your environment. But unfortunately there aren't much alternatives for them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One point which could in your case reduce the amount of data would be not to create each date between from and to else only one day of a month maybe the first day created per date(floor(monthstart())).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Dec 2016 14:58:43 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2016-12-08T14:58:43Z</dc:date>
    <item>
      <title>IntervalMatch (Extended Syntax)</title>
      <link>https://community.qlik.com/t5/QlikView/IntervalMatch-Extended-Syntax/m-p/1225141#M624329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a problem with the intervalmatch extended syntax, &lt;/P&gt;&lt;P&gt;see attached file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it dosent get the tartildato correct when i connect both tables with an intervalmatch. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output in QV: &lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/145948_pastedImage_2.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TaptVunnettable: &lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-2" height="52" src="https://community.qlik.com/legacyfs/online/145947_pastedImage_1.png" style="width: 921.143px; height: 52px;" width="921" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Produktbyttetable: &lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" height="57" src="https://community.qlik.com/legacyfs/online/145946_pastedImage_0.png" style="width: 1308.89px; height: 57px;" width="1309" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 20:37:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IntervalMatch-Extended-Syntax/m-p/1225141#M624329</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-07T20:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: IntervalMatch (Extended Syntax)</title>
      <link>https://community.qlik.com/t5/QlikView/IntervalMatch-Extended-Syntax/m-p/1225142#M624330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Most often I use a while-loop instead of an intervalmatch - take here an look on the example which loads the table "Dates": &lt;A href="https://community.qlik.com/qlik-blogpost/3274"&gt;Loops in the Script&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Dec 2016 12:32:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IntervalMatch-Extended-Syntax/m-p/1225142#M624330</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-12-08T12:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: IntervalMatch (Extended Syntax)</title>
      <link>https://community.qlik.com/t5/QlikView/IntervalMatch-Extended-Syntax/m-p/1225143#M624332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for reply. when am trying to load dates, it loads millions of millions of rows... never ending story. &lt;/P&gt;&lt;P&gt;Do you got an suggestion regardig my application? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Dec 2016 13:20:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IntervalMatch-Extended-Syntax/m-p/1225143#M624332</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-08T13:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: IntervalMatch (Extended Syntax)</title>
      <link>https://community.qlik.com/t5/QlikView/IntervalMatch-Extended-Syntax/m-p/1225144#M624334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How looked now your script-part with the while-loop? How many records has your table and how many iterations between From and To should be on average?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Dec 2016 13:30:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IntervalMatch-Extended-Syntax/m-p/1225144#M624334</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-12-08T13:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: IntervalMatch (Extended Syntax)</title>
      <link>https://community.qlik.com/t5/QlikView/IntervalMatch-Extended-Syntax/m-p/1225145#M624336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i got 78063167 new date rows when i added this to the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dates: &lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;Kundekontrakt, Date(TARIFFFRADATO + IterNo() -1) as Date&lt;/P&gt;&lt;P&gt;Resident Produktbytte&lt;/P&gt;&lt;P&gt;While IterNo() &amp;lt;= TARIFFTILDATO - TARIFFFRADATO + 1 ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;it dosent get the tartildato correct when i connect both tables with an intervalmatch. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;seems like the problem is that it matches TARIFFRADATO with both LEVFRADATO and LEVTILDATO. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;Levfradato and levtildato is the datekey. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Dec 2016 14:06:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IntervalMatch-Extended-Syntax/m-p/1225145#M624336</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-08T14:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: IntervalMatch (Extended Syntax)</title>
      <link>https://community.qlik.com/t5/QlikView/IntervalMatch-Extended-Syntax/m-p/1225146#M624338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your script to the while-part looked ok. but if I understand you right you made afterwards still the intervalmatch? If yes this needs to be removed. Further your field Kundekontrakt must be the correct key between Dates and Produktbytte - if not you need to add further fields as a combined key maybe within an autonumber().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general this kind of datamodelling (while-loops and intervalmatch) creates big tables - that's normal and expected but it could be too much for an application in your environment. But unfortunately there aren't much alternatives for them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One point which could in your case reduce the amount of data would be not to create each date between from and to else only one day of a month maybe the first day created per date(floor(monthstart())).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Dec 2016 14:58:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IntervalMatch-Extended-Syntax/m-p/1225146#M624338</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-12-08T14:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: IntervalMatch (Extended Syntax)</title>
      <link>https://community.qlik.com/t5/QlikView/IntervalMatch-Extended-Syntax/m-p/1225147#M624339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, thanks for reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think one of the problems is the datekey.&lt;/P&gt;&lt;P&gt;Maby if we change levtildato to (date-1) from all other responsible then 4024,25 (my company). &lt;/P&gt;&lt;P&gt;can that fix it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cuz it seems like the model cant handle levtildato, and levfradato as the same date. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/146054_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Do you know how i can change LEVTILDATO (efj.todate) to show date-1 where responsible != 4024,25 ?&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sql;&lt;/P&gt;&lt;P&gt;select efj.fromdate LevFraDato&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,efj.todate LevTilDato&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,efj.responsible&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,res.etternamn&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,efj.kundenr&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,efj.kontraktnr&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,kon.valstatus&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,kon.kontrretur KontraktFraDato&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,kon.kontroppseiingdato KontraktTilDato&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,kon.maalepktnr&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,kon.kontrgrnr&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,case when lag (kon.MAALEPKTNR,1) over (partition by kon.maalepktnr order by efj.fromdate) is null then 1 else 0 end as NyttMålepunkt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,lag (efj.responsible,1) over (partition by efj.kundenr,efj.kontraktnr order by efj.fromdate) ForrigeResponsible&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,lead (efj.responsible,1) over (partition by efj.kundenr,efj.kontraktnr order by efj.fromdate) NesteResponsible&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,lead (kon.kontraktnr,1) over (partition by kon.kundenr order by kon.kontrretur) NesteKontraktNr&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,case when lag (efj.responsible,1) over (partition by efj.kundenr,efj.kontraktnr order by efj.fromdate) is null then 1 else 0 end as NyKontrakt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,case when kon.kontroppseiingdato =&amp;nbsp; efj.todate then 1 else 0 end as TaptKontrakt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,case when (lag (efj.responsible,1) over (partition by efj.kundenr,efj.kontraktnr order by efj.fromdate) in (4024,25) and efj.responsible not in (4024,25)) or (lead (efj.responsible,1) over (partition by efj.kundenr,efj.kontraktnr order by efj.fromdate) is null and kon.kontroppseiingdato is not null) then 1 else 0 end as TaptTilAnnenKraftLev&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,case when nvl(lag (efj.responsible,1) over (partition by efj.kundenr,efj.kontraktnr order by efj.fromdate),0) not in (4024,25) and efj.responsible in (4024,25) then 1 else 0 end as VunnetFraAnnenKraftLev&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,case when nvl(lag (efj.responsible,1) over (partition by efj.kundenr,efj.kontraktnr order by efj.fromdate),0) in (4024,25) and efj.responsible in (4024,25) then 1 else 0 end as VunnetInternt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (4024,25) and efj.responsible not in (4024,25) then 1 else 0 end as FlyttetEksternt&lt;/P&gt;&lt;P&gt;&amp;nbsp; from felles.efmaalepktjurrole efj &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; left outer join felles.efjurperson res on res.jurpersonid = efj.responsible&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; left outer join kunde.ekkontrakt kon on kon.kontraktnr = efj.kontraktnr and kon.kundenr = efj.kundenr &lt;/P&gt;&lt;P&gt;where efj.fromdate != efj.todate and nvl(kon.kontroppseiingdato,to_date('2073.06.01','yyyy.mm.dd')) != kon.kontrretur&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Dec 2016 15:07:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IntervalMatch-Extended-Syntax/m-p/1225147#M624339</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-08T15:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: IntervalMatch (Extended Syntax)</title>
      <link>https://community.qlik.com/t5/QlikView/IntervalMatch-Extended-Syntax/m-p/1225148#M624340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I must admit that I couldn't see how levtildato is involved by creating an interval respectively link-table between TARIFFTILDATO and TARIFFFRADATO. Beside them I wouldn't touch the sql-statement I would make all adjustments within a &lt;A href="https://community.qlik.com/qlik-blogpost/2972"&gt;Preceding Load&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Dec 2016 15:19:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IntervalMatch-Extended-Syntax/m-p/1225148#M624340</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-12-08T15:19:21Z</dc:date>
    </item>
  </channel>
</rss>

