<?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: scripting in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/scripting/m-p/700846#M671428</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this:&lt;/P&gt;&lt;P&gt;CumulativeSum:&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="text-decoration: underline;"&gt; Name &amp;amp; '|' &amp;amp; Year as %NameYear,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Name &amp;lt;&amp;gt; Previous(Name) or Year &amp;lt;&amp;gt; Previous(Year), Sales, RangeSum(Sales, Peek('CumulativeSum'))) AS CumulativeSum&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Resident Temp1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;given your Table above then write:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;intervalls:&lt;/P&gt;&lt;P&gt;Intervallmatch(CumulativeSum, %NameYear)&lt;/P&gt;&lt;P&gt;load*&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;Start,&lt;/P&gt;&lt;P&gt;End,&lt;/P&gt;&lt;P&gt;Name &amp;amp; '|'&amp;nbsp; &amp;amp;&amp;nbsp; as %NameYear,&lt;/P&gt;&lt;P&gt;Commission&lt;/P&gt;&lt;P&gt;Resident myintervalltable; //this is the table you posted above&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join (CumulativeSum)&lt;/P&gt;&lt;P&gt;%NameYear,&lt;/P&gt;&lt;P&gt;Commission&lt;/P&gt;&lt;P&gt;Resident intervalls;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table intervalls;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will however only work when you only have one Value for CumulativeSum per every Name/Year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Sep 2014 20:11:03 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-09-15T20:11:03Z</dc:date>
    <item>
      <title>scripting</title>
      <link>https://community.qlik.com/t5/QlikView/scripting/m-p/700845#M671427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Qv,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD Name, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(Date) as Year, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;Data.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is [Dummy Sales]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp1:&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;Resident Temp&lt;/P&gt;&lt;P&gt;Order by Name, Date;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CumulativeSum:&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales,&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Name &amp;lt;&amp;gt; Previous(Name) or Year &amp;lt;&amp;gt; Previous(Year), Sales, RangeSum(Sales, Peek('CumulativeSum'))) AS CumulativeSum&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Resident Temp1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table Temp1;&lt;/P&gt;&lt;P&gt;---------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have done Cumulative sum for above and the problem is i need commission for Different names commision may vary how to give dynamic in set analysic plz help me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data is like this how to do ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border: 0px solid black;" width="86"&gt;Name &lt;/TD&gt;&lt;TD class="xl63" style="border: 0px solid black; border-left: none;" width="86"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year&lt;/TD&gt;&lt;TD class="xl63" style="border: 0px solid black; border-left: none;" width="86"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Start&lt;/TD&gt;&lt;TD class="xl63" style="border: 0px solid black; border-left: none;" width="86"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&amp;nbsp; &lt;/TD&gt;&lt;TD class="xl63" style="border: 0px solid black; border-left: none;" width="86"&gt;&amp;nbsp;&amp;nbsp; Commission&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border: 0px solid black; border-top: none;"&gt;Peter&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;60000&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1.0%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border: 0px solid black; border-top: none;"&gt;Peter&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;60001&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;100000&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1.5%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border: 0px solid black; border-top: none;"&gt;Peter&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;100001&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;150000&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2.0%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border: 0px solid black; border-top: none;"&gt;Peter&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;50000&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1.0%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border: 0px solid black; border-top: none;"&gt;Peter&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;50001&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;100000&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1.5%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border: 0px solid black; border-top: none;"&gt;Peter&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;100001&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;150000&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2.0%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border: 0px solid black; border-top: none;"&gt;Tom&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;50000&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1.2%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border: 0px solid black; border-top: none;"&gt;Tom&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;50001&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;100000&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1.6%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border: 0px solid black; border-top: none;"&gt;Tom&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;100001&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;150000&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2.5%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border: 0px solid black; border-top: none;"&gt;Tom&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;50000&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1.2%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border: 0px solid black; border-top: none;"&gt;Tom&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;50001&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;100000&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1.6%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border: 0px solid black; border-top: none;"&gt;Tom&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;100001&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;150000&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2.5%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border: 0px solid black; border-top: none;"&gt;Mark&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;50000&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0.8%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border: 0px solid black; border-top: none;"&gt;Mark&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;50001&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;80000&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1.4%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border: 0px solid black; border-top: none;"&gt;Mark&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;80001&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;140000&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2.0%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border: 0px solid black; border-top: none;"&gt;Mark&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;50000&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0.8%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border: 0px solid black; border-top: none;"&gt;Mark&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;50001&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;80000&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1.4%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border: 0px solid black; border-top: none;"&gt;Mark&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;80001&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;140000&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2.0%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 16:08:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/scripting/m-p/700845#M671427</guid>
      <dc:creator />
      <dc:date>2014-09-15T16:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: scripting</title>
      <link>https://community.qlik.com/t5/QlikView/scripting/m-p/700846#M671428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this:&lt;/P&gt;&lt;P&gt;CumulativeSum:&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="text-decoration: underline;"&gt; Name &amp;amp; '|' &amp;amp; Year as %NameYear,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Name &amp;lt;&amp;gt; Previous(Name) or Year &amp;lt;&amp;gt; Previous(Year), Sales, RangeSum(Sales, Peek('CumulativeSum'))) AS CumulativeSum&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Resident Temp1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;given your Table above then write:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;intervalls:&lt;/P&gt;&lt;P&gt;Intervallmatch(CumulativeSum, %NameYear)&lt;/P&gt;&lt;P&gt;load*&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;Start,&lt;/P&gt;&lt;P&gt;End,&lt;/P&gt;&lt;P&gt;Name &amp;amp; '|'&amp;nbsp; &amp;amp;&amp;nbsp; as %NameYear,&lt;/P&gt;&lt;P&gt;Commission&lt;/P&gt;&lt;P&gt;Resident myintervalltable; //this is the table you posted above&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join (CumulativeSum)&lt;/P&gt;&lt;P&gt;%NameYear,&lt;/P&gt;&lt;P&gt;Commission&lt;/P&gt;&lt;P&gt;Resident intervalls;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table intervalls;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will however only work when you only have one Value for CumulativeSum per every Name/Year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 20:11:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/scripting/m-p/700846#M671428</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-15T20:11:03Z</dc:date>
    </item>
  </channel>
</rss>

