<?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: Strange interval match issue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Strange-interval-match-issue/m-p/1622126#M594352</link>
    <description>&lt;P&gt;Would you be able to share a sample where we can see this? May be we can spot the cases by looking?&lt;/P&gt;</description>
    <pubDate>Tue, 10 Sep 2019 13:26:43 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2019-09-10T13:26:43Z</dc:date>
    <item>
      <title>Strange interval match issue</title>
      <link>https://community.qlik.com/t5/QlikView/Strange-interval-match-issue/m-p/1622120#M594350</link>
      <description>&lt;P&gt;&lt;STRONG&gt;I encountered a strange interval match issue. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I am trying to get a commission rate by matching profit % with a profit range, so different profit% will have different commission rate. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In database, profit% is maintained in step, like 5, 10, 15..., I converted it to a range by adding a decimal, so I got below. If given profit fell into specific stand-end range, then I got the rate.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;start, end,&amp;nbsp;commission rate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;0&amp;nbsp;, 5, 1%&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;5.0001, 10,&amp;nbsp; 2%&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;10.0001,15, 3%&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;....&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;For most of the cases, it works properly. However, there are always some cases that it will not get a commission rate (show as null value). I tried to add a decimal 0.00001 to the&amp;nbsp;given profit%. It resolved some issues, but it will still have other similar issues. It looks like&amp;nbsp;a bug of the system, really have no idea for the reason. Anyone can help?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Since there is no clue in which circumstances this will happen, I don't know how to provide an example.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:31:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strange-interval-match-issue/m-p/1622120#M594350</guid>
      <dc:creator>achates2008</dc:creator>
      <dc:date>2024-11-16T02:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: Strange interval match issue</title>
      <link>https://community.qlik.com/t5/QlikView/Strange-interval-match-issue/m-p/1622125#M594351</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;have you already tried to round the value before using interval match?&lt;/P&gt;&lt;P&gt;ex Round(Field,0.0001)&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 13:26:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strange-interval-match-issue/m-p/1622125#M594351</guid>
      <dc:creator>StarinieriG</dc:creator>
      <dc:date>2019-09-10T13:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: Strange interval match issue</title>
      <link>https://community.qlik.com/t5/QlikView/Strange-interval-match-issue/m-p/1622126#M594352</link>
      <description>&lt;P&gt;Would you be able to share a sample where we can see this? May be we can spot the cases by looking?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 13:26:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strange-interval-match-issue/m-p/1622126#M594352</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-09-10T13:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Strange interval match issue</title>
      <link>https://community.qlik.com/t5/QlikView/Strange-interval-match-issue/m-p/1622132#M594353</link>
      <description>&lt;P&gt;I didn't. Do you mean to round given the profit%? What difference it will make?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 13:33:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strange-interval-match-issue/m-p/1622132#M594353</guid>
      <dc:creator>achates2008</dc:creator>
      <dc:date>2019-09-10T13:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: Strange interval match issue</title>
      <link>https://community.qlik.com/t5/QlikView/Strange-interval-match-issue/m-p/1622135#M594354</link>
      <description>&lt;P&gt;I guess not possible because it is in internal network, and file is very big, also sensitive.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 13:34:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strange-interval-match-issue/m-p/1622135#M594354</guid>
      <dc:creator>achates2008</dc:creator>
      <dc:date>2019-09-10T13:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: Strange interval match issue</title>
      <link>https://community.qlik.com/t5/QlikView/Strange-interval-match-issue/m-p/1622138#M594355</link>
      <description>&lt;P&gt;Because using range like that&lt;/P&gt;&lt;P&gt;0 5&lt;/P&gt;&lt;P&gt;5.0001 10&lt;/P&gt;&lt;P&gt;If you have a value like 5.000007, it will be null&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 13:39:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strange-interval-match-issue/m-p/1622138#M594355</guid>
      <dc:creator>StarinieriG</dc:creator>
      <dc:date>2019-09-10T13:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: Strange interval match issue</title>
      <link>https://community.qlik.com/t5/QlikView/Strange-interval-match-issue/m-p/1622144#M594356</link>
      <description>&lt;P&gt;Good point! I should improve accordingly.&lt;/P&gt;&lt;P&gt;However, I checked the value, it is exactly in between the range.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 13:43:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strange-interval-match-issue/m-p/1622144#M594356</guid>
      <dc:creator>achates2008</dc:creator>
      <dc:date>2019-09-10T13:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: Strange interval match issue</title>
      <link>https://community.qlik.com/t5/QlikView/Strange-interval-match-issue/m-p/1622174#M594357</link>
      <description>&lt;P&gt;problem with Interval match is that the condition is inclusive&lt;/P&gt;&lt;P&gt;It is like adding "x &amp;gt;=&amp;nbsp; y and x &amp;lt;= z" and when you use an inclusive condition to define the ranges you always end up with a gap between the ranges.&lt;/P&gt;&lt;P&gt;For this and some performance reasons I have stopped using the interval match functionality in favor of doing it manually.&lt;/P&gt;&lt;P&gt;Follow these Steps...&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Create a table with the disctinct values of the thing you are trying to evaluate with your ranges.&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="markup"&gt;RangeAssignments:
Load 
   FieldValue('Your Field',Recno()) as [Your Field]
Autogenerate FeildValueCount('Your Field');&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;Left Join your range buckets onto your Range Assignement table without a qualifying field. The results of this join will be a cartesean product. you should be careful because this can cause a significant increase in memory utilization.&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="markup"&gt;Left Join(RangeAssignments)
Load
   BeginRange
   EndRange
   RangeDesc
Inline [
   BeginRange,EndRange,RangeDesc
   -99999999,0,Error low value &amp;lt;=0
   0,5,&amp;gt;0&amp;lt;=5
   5,10,&amp;gt;5&amp;lt;=10
   10,15,&amp;gt;10&amp;lt;=15
   15,9999999999,&amp;gt;15
];
   &lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;Join the table back on itself with a qualifying fields and where clause. Set your where clause so it will be consistent with the desired way you want to apply your ranges.&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="markup"&gt;Inner Join(RangeAssignments)
Load
   [Your Field],
   BeginRange,
   EndRange
Resident RangeAssignments
Where [Your Field] &amp;gt; BeginRange and [Your Field] &amp;lt;= EndRange;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 14:11:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strange-interval-match-issue/m-p/1622174#M594357</guid>
      <dc:creator>chriscammers</dc:creator>
      <dc:date>2019-09-10T14:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: Strange interval match issue</title>
      <link>https://community.qlik.com/t5/QlikView/Strange-interval-match-issue/m-p/1622182#M594358</link>
      <description>&lt;P&gt;Impressive idea! Thanks Chris! I will try also.&lt;/P&gt;&lt;P&gt;I would say sorry that I found this time it&amp;nbsp;was my mistake. The matched result was excluded finally during left join...&lt;/P&gt;&lt;P&gt;On the other hand, previously I really resolved the issue by adding 0.0001, and the value should be in the range.&lt;/P&gt;&lt;P&gt;Anyway, I thank you all for the help!&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 14:32:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strange-interval-match-issue/m-p/1622182#M594358</guid>
      <dc:creator>achates2008</dc:creator>
      <dc:date>2019-09-10T14:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: Strange interval match issue</title>
      <link>https://community.qlik.com/t5/QlikView/Strange-interval-match-issue/m-p/1622686#M594359</link>
      <description>&lt;P&gt;An alternatively and my preferred way to resolve interval data is the use of while-loops. IMO they are easier and more flexible as the native intervalmatch-feature - especially if you avoid overlapping the intervals and used an appropriate rounding or even an integer it's a very simple approach:&lt;/P&gt;&lt;P&gt;load *, start + iterno() - 1 as KEY, iterno() as IterNo, rowno() as RowNo &lt;STRONG&gt;while&lt;/STRONG&gt; start + iterno() - 1 &amp;lt;= end;&lt;BR /&gt;load * inline [&lt;BR /&gt;start, end, commission rate&lt;BR /&gt;0 , &lt;STRONG&gt;4&lt;/STRONG&gt;, 1%&lt;BR /&gt;5, 10, 2%&lt;BR /&gt;&lt;STRONG&gt;11&lt;/STRONG&gt;,15, 3%&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 14:22:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strange-interval-match-issue/m-p/1622686#M594359</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-09-11T14:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: Strange interval match issue</title>
      <link>https://community.qlik.com/t5/QlikView/Strange-interval-match-issue/m-p/1627049#M594360</link>
      <description>&lt;P&gt;Just going to leave a couple of links here as well that may come in handy for others that run across this post:&lt;/P&gt;
&lt;P&gt;Design Blog post on IntervalMatch:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/IntervalMatch/ba-p/1464547" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/IntervalMatch/ba-p/1464547&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Design Blog post on rounding issues:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/Rounding-Errors/ba-p/1468808" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/Rounding-Errors/ba-p/1468808&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Hopefully these may help others that run across this one.&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;Achates, I am also going to mark your last post as the solution on this one as well, just FYI.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards,&lt;BR /&gt;Brett&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2019 16:34:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strange-interval-match-issue/m-p/1627049#M594360</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2019-09-23T16:34:37Z</dc:date>
    </item>
  </channel>
</rss>

