<?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: Rangesum complex (?) issue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Rangesum-complex-issue/m-p/931812#M322081</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes I did the the sorting issue is a real drawback.&lt;/P&gt;&lt;P&gt;I hoped to manage to avoid it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Nov 2015 18:20:50 GMT</pubDate>
    <dc:creator>oxiofrt</dc:creator>
    <dc:date>2015-11-04T18:20:50Z</dc:date>
    <item>
      <title>Rangesum complex (?) issue</title>
      <link>https://community.qlik.com/t5/QlikView/Rangesum-complex-issue/m-p/931804#M322073</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;I have created a table containing a limited number of columns.&lt;/P&gt;&lt;P&gt;Sort order is important in that table :&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;1 : weight&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;2 : order (useful in case of equality of weight)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Qlikview&amp;nbsp; document herejoined contains the table with a few date, and a screenshot detailing what is the expected result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried several ways to do it, without success. It probably needs to use rangesum function but I don't know how to specifiy the dimensions on which the rangesum should be applicated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2015 21:16:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rangesum-complex-issue/m-p/931804#M322073</guid>
      <dc:creator>oxiofrt</dc:creator>
      <dc:date>2015-11-03T21:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: Rangesum complex (?) issue</title>
      <link>https://community.qlik.com/t5/QlikView/Rangesum-complex-issue/m-p/931805#M322074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/103847_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2015 21:40:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rangesum-complex-issue/m-p/931805#M322074</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-11-03T21:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: Rangesum complex (?) issue</title>
      <link>https://community.qlik.com/t5/QlikView/Rangesum-complex-issue/m-p/931806#M322075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rangesum(below(sum(weight),1,Rowno()))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this expression, you specified 1. does the sum start from current row. what if we specify 0 and what rowno() doing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have 10 , 8, 0. How are we getting 0?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Varun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2015 21:45:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rangesum-complex-issue/m-p/931806#M322075</guid>
      <dc:creator>varunreddy</dc:creator>
      <dc:date>2015-11-03T21:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: Rangesum complex (?) issue</title>
      <link>https://community.qlik.com/t5/QlikView/Rangesum-complex-issue/m-p/931807#M322076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or maybe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=aggr( rangesum(below(sum(WEIGHT),1,NoOfRows())), AGENT,&amp;nbsp; ORDER)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;allowing you to resort the straight table, with the drawback that the ORDER field needs load order like requested sort order (which is the case in your sample qvw).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2015 23:49:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rangesum-complex-issue/m-p/931807#M322076</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-11-03T23:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: Rangesum complex (?) issue</title>
      <link>https://community.qlik.com/t5/QlikView/Rangesum-complex-issue/m-p/931808#M322077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much Sunny, we are close to the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There's something I miss : why doesn't it work anymore as soon as I add the WEIGHT column within the table ? (all rangesum values are turning to zero)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Didn't succeed to solve it...&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Qlik.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/103939_Qlik.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 17:42:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rangesum-complex-issue/m-p/931808#M322077</guid>
      <dc:creator>oxiofrt</dc:creator>
      <dc:date>2015-11-04T17:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Rangesum complex (?) issue</title>
      <link>https://community.qlik.com/t5/QlikView/Rangesum-complex-issue/m-p/931809#M322078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add WEIGHT and ORDER as expressions rather than dimension in your chart and see if that works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/103952_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 17:56:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rangesum-complex-issue/m-p/931809#M322078</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-11-04T17:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Rangesum complex (?) issue</title>
      <link>https://community.qlik.com/t5/QlikView/Rangesum-complex-issue/m-p/931810#M322079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I had simplified the table, not imaginating that dimensions could be a problem.&lt;/P&gt;&lt;P&gt;You will find herejoined the table with the dimension I would like to display in that table, including an additional variable which is used in a test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adding that dimensions is causing the problem. !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 18:16:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rangesum-complex-issue/m-p/931810#M322079</guid>
      <dc:creator>oxiofrt</dc:creator>
      <dc:date>2015-11-04T18:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Rangesum complex (?) issue</title>
      <link>https://community.qlik.com/t5/QlikView/Rangesum-complex-issue/m-p/931811#M322080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you looked at &lt;A _jive_internal="true" href="https://community.qlik.com/people/swuehl"&gt;swuehl&lt;/A&gt;‌ response? I have not checked it, but I have a feeling that his might not be affected by adding another dimension.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 18:18:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rangesum-complex-issue/m-p/931811#M322080</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-11-04T18:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Rangesum complex (?) issue</title>
      <link>https://community.qlik.com/t5/QlikView/Rangesum-complex-issue/m-p/931812#M322081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes I did the the sorting issue is a real drawback.&lt;/P&gt;&lt;P&gt;I hoped to manage to avoid it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 18:20:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rangesum-complex-issue/m-p/931812#M322081</guid>
      <dc:creator>oxiofrt</dc:creator>
      <dc:date>2015-11-04T18:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: Rangesum complex (?) issue</title>
      <link>https://community.qlik.com/t5/QlikView/Rangesum-complex-issue/m-p/931813#M322082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Adding the dimension will be problematic because if you add dimensions you will need to use Aggr function and Aggr function will sort based on the sort order even if I tell it to no do that. I think you have two options&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Go by Stefan's method and sort in the script&lt;/P&gt;&lt;P&gt;2) Use all your other dimensions as expressions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I were you, I will spend some extra time getting it done through method 1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 18:29:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rangesum-complex-issue/m-p/931813#M322082</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-11-04T18:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: Rangesum complex (?) issue</title>
      <link>https://community.qlik.com/t5/QlikView/Rangesum-complex-issue/m-p/931814#M322083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the result depending on selections you make? If not, maybe it would be best to do the complete calculation in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Meanwhile, I was wondering if our calculation is correct at all. You are telling in your qvw, that &lt;/P&gt;&lt;P&gt;we need to sum values for agent 2012123 (in first line) where weight &amp;gt;=10 and order &amp;gt;14.&lt;/P&gt;&lt;P&gt;Why do you add C7 (weight = &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; then?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 18:43:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rangesum-complex-issue/m-p/931814#M322083</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-11-04T18:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: Rangesum complex (?) issue</title>
      <link>https://community.qlik.com/t5/QlikView/Rangesum-complex-issue/m-p/931815#M322084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well I may have been clearer...&lt;/P&gt;&lt;P&gt;The aim is to sum for each agent the column WEIGHT, only for lines where ORDER is &amp;gt; to the ORDER value of the&amp;nbsp; current line.&lt;/P&gt;&lt;P&gt;For agent 2012123 and line 1, it shoud sum all WEIGHT values for this agent where ORDER is &amp;gt; 14.&lt;/P&gt;&lt;P&gt;For agent 2012123 and line 5, it shoud sum all WEIGHT values for this agent where ORDER is &amp;gt; 15.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result has to be calculated according to sélections.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for all the precious help provided.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 19:39:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rangesum-complex-issue/m-p/931815#M322084</guid>
      <dc:creator>oxiofrt</dc:creator>
      <dc:date>2015-11-04T19:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: Rangesum complex (?) issue</title>
      <link>https://community.qlik.com/t5/QlikView/Rangesum-complex-issue/m-p/931816#M322085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does my above suggested solution works for you? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorting the load order should not be a big issue, it's enough to create a table first in the script with all possible ORDER values:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TMP: // table must appear in your script before you load ORDER from your sources&lt;/P&gt;&lt;P&gt;LOAD recno() as ORDER&lt;/P&gt;&lt;P&gt;Autogenerate 1000; // assuming range ORDER from 1 to max 1000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then execute your script. You can even DROP TABLE TMP; at the end of the script, if you want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 20:31:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rangesum-complex-issue/m-p/931816#M322085</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-11-04T20:31:58Z</dc:date>
    </item>
  </channel>
</rss>

