<?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 max 1 match in interval match function?! in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/max-1-match-in-interval-match-function/m-p/156920#M32607</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;I'm using an interval match in my script which works good except for 1 thing:&lt;BR /&gt;&lt;BR /&gt;In some occasions the interval match finds 2 results, because of this there are 2 records created with the same data except for the intervalmatch result. I don't want this...&lt;/P&gt;&lt;P&gt;Is it possible to limit the number of results in an interval match? (the first result will do).&lt;BR /&gt;(the solution is not to make the records in the table where my intervalmatch gets its results unique because i need all data in that table..)&lt;/P&gt;&lt;P&gt;thx!&lt;/P&gt;&lt;P&gt;david&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Mar 2011 13:05:42 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-03-11T13:05:42Z</dc:date>
    <item>
      <title>max 1 match in interval match function?!</title>
      <link>https://community.qlik.com/t5/QlikView/max-1-match-in-interval-match-function/m-p/156920#M32607</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;I'm using an interval match in my script which works good except for 1 thing:&lt;BR /&gt;&lt;BR /&gt;In some occasions the interval match finds 2 results, because of this there are 2 records created with the same data except for the intervalmatch result. I don't want this...&lt;/P&gt;&lt;P&gt;Is it possible to limit the number of results in an interval match? (the first result will do).&lt;BR /&gt;(the solution is not to make the records in the table where my intervalmatch gets its results unique because i need all data in that table..)&lt;/P&gt;&lt;P&gt;thx!&lt;/P&gt;&lt;P&gt;david&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 13:05:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/max-1-match-in-interval-match-function/m-p/156920#M32607</guid>
      <dc:creator />
      <dc:date>2011-03-11T13:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: max 1 match in interval match function?!</title>
      <link>https://community.qlik.com/t5/QlikView/max-1-match-in-interval-match-function/m-p/156921#M32608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello David,&lt;/P&gt;&lt;P&gt;Check the following piece of script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;// The last two lines are for the same ID, I onlye want to keep the highest (1890)&lt;/P&gt;&lt;P&gt;Facts:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;ID, VALUE &lt;/P&gt;&lt;P&gt;1000, 400&lt;/P&gt;&lt;P&gt;2000, 900&lt;/P&gt;&lt;P&gt;3000, 1250&lt;/P&gt;&lt;P&gt;4000, 1010&lt;/P&gt;&lt;P&gt;4000, 1890]; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Intervals:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;RANGESTART, RANGEEND, RANGENAME&lt;/P&gt;&lt;P&gt;100, 500, A&lt;/P&gt;&lt;P&gt;501, 1000, B&lt;/P&gt;&lt;P&gt;1001, 1600, C&lt;/P&gt;&lt;P&gt;1599, 2000, D]; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FactsWithIntervals:&lt;/P&gt;&lt;P&gt;INTERVALMATCH (VALUE) LOAD RANGESTART, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RANGEEND&lt;/P&gt;&lt;P&gt;RESIDENT Intervals;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE Intervals; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OnlyOneRecordPerInterval:&lt;/P&gt;&lt;P&gt;RIGHT KEEP LOAD ID, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Max(VALUE) AS VALUE&lt;/P&gt;&lt;P&gt;RESIDENT FactsGROUP BY ID;&lt;/P&gt;&lt;P&gt;JOIN LOAD *&lt;/P&gt;&lt;P&gt;RESIDENT FactsWithIntervals; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE Facts;&lt;/P&gt;&lt;P&gt;DROP TABLE FactsWithIntervals;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind of cumbersome with the cleanup to avoid unwanted synthetic keys and leave only corresponding data, though.&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 13:40:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/max-1-match-in-interval-match-function/m-p/156921#M32608</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-03-11T13:40:58Z</dc:date>
    </item>
  </channel>
</rss>

