<?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: Need formula like RangeSum(Above)... in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-formula-like-RangeSum-Above/m-p/1036477#M349358</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great thanks for your input!&lt;/P&gt;&lt;P&gt;Indeed, the solution you suggested worked in all its simplicity! sometimes you dont see the forest for all the trees...!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The upgrade to qv12 is scheduled to early fall so we will se what happens then!&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Feb 2016 11:52:58 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-02-16T11:52:58Z</dc:date>
    <item>
      <title>Need formula like RangeSum(Above)...</title>
      <link>https://community.qlik.com/t5/QlikView/Need-formula-like-RangeSum-Above/m-p/1036475#M349356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have encountered a problem with a formula when SR13 were installed on our server&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The goal of the formula is to get one day per employee, the one day where more than 50% of damages within a given period is done (finished, paid...)&lt;/P&gt;&lt;P&gt;The simple formula is: Closed/Total, and Closed means closed up until given day (at day nr 4 then calc closed damages from day 0 to day 4).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the days in a dimension and used a formula:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rangesum(above(sum([_count_closed_damage]),0,RowNo())) &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Aggr( nodistinct count([_count_all_damage]),SKI)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This gives a good calculated percentage but to get only THE ONE I want i used:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;IF(rangesum(above(sum([_count_closed_damage]),0,RowNo())) &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Aggr( nodistinct count([_count_all_damage]),SKI)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&amp;gt;=0.5,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (rangesum(above(sum([_count_closed_damage]),1,RowNo())) &lt;/P&gt;&lt;P&gt;&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;&amp;nbsp;&amp;nbsp; Aggr( nodistinct count([_count_all_damage]),SKI)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&amp;lt;0.5,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rangesum(above(sum([_count_closed_damage]),0,RowNo())) &lt;/P&gt;&lt;P&gt;&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;&amp;nbsp;&amp;nbsp; Aggr( nodistinct count([_count_all_damage]),SKI)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,0&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;IMG alt="qv_img.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/114643_qv_img.png" style="height: 211px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;This puts a zero in all places but the right one, and then combined with Supress Zero did the job elegantly ( &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BUT in SR13 Supress Zero has unfortunately been banned in this type of formula (Why this has been banned is an answer i have not seen...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I need another way of calculating, and I need help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried encapsulating the existing formula in a Sum(Aggr()) which enables SupressZero to work as it should, but this only works if load-order is correct.... and that I cannot achive. The load script is complex, and Days is a calculated field...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have experimentet with Set-analysis (using Rowno, ValueLoop and so on) but as always, Set-analysis is calculated before the chart... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can not put everything in the load script since the funktionality depends on user-selections&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I desperately need help in finding a way to solve this puzzle!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Feb 2016 13:39:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-formula-like-RangeSum-Above/m-p/1036475#M349356</guid>
      <dc:creator />
      <dc:date>2016-02-15T13:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: Need formula like RangeSum(Above)...</title>
      <link>https://community.qlik.com/t5/QlikView/Need-formula-like-RangeSum-Above/m-p/1036476#M349357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your table seems to be working ok also in QV12. I assume an upgrade is not an option?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There might be other expressions possible that return your requested result, but I would need to think about alternatives a bit more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Getting your load order correct is quite easy, though, just create a table load with the field in question first in the script, before you are loading any other occurences of that field. Then, if you can assume a value range 0 to 1000 days for example, create a table load like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DUMMY:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD RecNo()-1 as [Handläggningsdagar]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;AutoGenerate 1000;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then load your other tables and perform your calculations and transformations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the very end, you can drop the DUMMY table, if you want:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP TABLE DUMMY;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even when you drop the table, the initial load order of the field values is preserved.&lt;/P&gt;&lt;P&gt;Now your Sum(Aggr(..., Dim1, Dim2)) should work just fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Feb 2016 18:22:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-formula-like-RangeSum-Above/m-p/1036476#M349357</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-02-15T18:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: Need formula like RangeSum(Above)...</title>
      <link>https://community.qlik.com/t5/QlikView/Need-formula-like-RangeSum-Above/m-p/1036477#M349358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great thanks for your input!&lt;/P&gt;&lt;P&gt;Indeed, the solution you suggested worked in all its simplicity! sometimes you dont see the forest for all the trees...!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The upgrade to qv12 is scheduled to early fall so we will se what happens then!&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Feb 2016 11:52:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-formula-like-RangeSum-Above/m-p/1036477#M349358</guid>
      <dc:creator />
      <dc:date>2016-02-16T11:52:58Z</dc:date>
    </item>
  </channel>
</rss>

