<?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: Accumulative sum leaser or first greater than value in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Accumulative-sum-leaser-or-first-greater-than-value/m-p/2073521#M88046</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/5163"&gt;@oscarvictory&lt;/a&gt;&amp;nbsp; Is the ACCUM and STOCK are measure in chart or fields in table?&lt;/P&gt;</description>
    <pubDate>Sat, 20 May 2023 23:08:27 GMT</pubDate>
    <dc:creator>Kushal_Chawda</dc:creator>
    <dc:date>2023-05-20T23:08:27Z</dc:date>
    <item>
      <title>Accumulative sum leaser or first greater than value</title>
      <link>https://community.qlik.com/t5/App-Development/Accumulative-sum-leaser-or-first-greater-than-value/m-p/2073390#M88021</link>
      <description>&lt;P&gt;Hi all, maybe you can help me out with this question.&lt;/P&gt;
&lt;P&gt;Here is my table from SQL:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Table_1.jpg" style="width: 533px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/107597i02926F18A2CE1E96/image-size/large?v=v2&amp;amp;px=999" role="button" title="Table_1.jpg" alt="Table_1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;and&amp;nbsp;what I need is to display only the rows where ACUM sum includes STOCK amount:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Table_2.jpg" style="width: 545px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/107596i08BD4C6C073D9548/image-size/large?v=v2&amp;amp;px=999" role="button" title="Table_2.jpg" alt="Table_2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; Many TKS in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 16:32:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Accumulative-sum-leaser-or-first-greater-than-value/m-p/2073390#M88021</guid>
      <dc:creator>oscarvictory</dc:creator>
      <dc:date>2023-05-19T16:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulative sum leaser or first greater than value</title>
      <link>https://community.qlik.com/t5/App-Development/Accumulative-sum-leaser-or-first-greater-than-value/m-p/2073521#M88046</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/5163"&gt;@oscarvictory&lt;/a&gt;&amp;nbsp; Is the ACCUM and STOCK are measure in chart or fields in table?&lt;/P&gt;</description>
      <pubDate>Sat, 20 May 2023 23:08:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Accumulative-sum-leaser-or-first-greater-than-value/m-p/2073521#M88046</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2023-05-20T23:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulative sum leaser or first greater than value</title>
      <link>https://community.qlik.com/t5/App-Development/Accumulative-sum-leaser-or-first-greater-than-value/m-p/2073660#M88059</link>
      <description>&lt;P&gt;Hi Kushal, they are just fields in the table.&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 07:56:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Accumulative-sum-leaser-or-first-greater-than-value/m-p/2073660#M88059</guid>
      <dc:creator>oscarvictory</dc:creator>
      <dc:date>2023-05-22T07:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulative sum leaser or first greater than value</title>
      <link>https://community.qlik.com/t5/App-Development/Accumulative-sum-leaser-or-first-greater-than-value/m-p/2073667#M88060</link>
      <description>&lt;P&gt;In fact I did try:&lt;/P&gt;
&lt;P&gt;if( Aggr(RangeSum(above(Sum( STOCK) , 0, RowNo(TOTAL))),PRODUCT, STOCK ) &amp;gt; ACUM, STOCK )&lt;/P&gt;
&lt;P&gt;But it did not work.&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 08:11:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Accumulative-sum-leaser-or-first-greater-than-value/m-p/2073667#M88060</guid>
      <dc:creator>oscarvictory</dc:creator>
      <dc:date>2023-05-22T08:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulative sum leaser or first greater than value</title>
      <link>https://community.qlik.com/t5/App-Development/Accumulative-sum-leaser-or-first-greater-than-value/m-p/2073731#M88065</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/5163"&gt;@oscarvictory&lt;/a&gt;&amp;nbsp; I see that for all product , you have used RCV_DATE descending to compare&amp;nbsp; ACCUM with STOCK, but for last product first Date should be 01/11/2021 so shouldn't it be 12 instead of 4?&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 09:43:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Accumulative-sum-leaser-or-first-greater-than-value/m-p/2073731#M88065</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2023-05-22T09:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulative sum leaser or first greater than value</title>
      <link>https://community.qlik.com/t5/App-Development/Accumulative-sum-leaser-or-first-greater-than-value/m-p/2073746#M88066</link>
      <description>&lt;P&gt;You are right, you can dismiss the last line, it was added manually in order to enlarge the sample. But obvuiously date is wrong.&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 09:57:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Accumulative-sum-leaser-or-first-greater-than-value/m-p/2073746#M88066</guid>
      <dc:creator>oscarvictory</dc:creator>
      <dc:date>2023-05-22T09:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulative sum leaser or first greater than value</title>
      <link>https://community.qlik.com/t5/App-Development/Accumulative-sum-leaser-or-first-greater-than-value/m-p/2073776#M88069</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/5163"&gt;@oscarvictory&lt;/a&gt;&amp;nbsp; try below expression with Product and rcv_date as dimension. Below is the expression for ACCUM. If you have other measures in table, you need to&amp;nbsp; replace highlighted part with that measure expression so that when you uncheck "Include zero value" (Qlik sense) or "suppress zero value" (QlikView) it will show the relevant rows&lt;/P&gt;
&lt;P&gt;=if(aggr(rangesum(above(total Sum(ACCUM),0,RowNo())), PRODUCT,(RCV_DATE,(NUMERIC,DESCENDING))) &amp;lt;= min(total &amp;lt;PRODUCT&amp;gt;aggr(if(rangesum(above(total Sum(ACCUM),0,RowNo())) &amp;gt; sum(STOCK),rangesum(above(total Sum(ACCUM),0,RowNo()))), PRODUCT,(RCV_DATE,(NUMERIC,DESCENDING)))), &lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Sum(ACCUM),&lt;/FONT&gt;0)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 10:47:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Accumulative-sum-leaser-or-first-greater-than-value/m-p/2073776#M88069</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2023-05-22T10:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulative sum leaser or first greater than value</title>
      <link>https://community.qlik.com/t5/App-Development/Accumulative-sum-leaser-or-first-greater-than-value/m-p/2073802#M88073</link>
      <description>&lt;P&gt;I have replaced the red expression by &lt;SPAN&gt;Sum(STOCK) because is the correct one, but it seems that something is wrong.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In this example it should have taken the three first rows = ACCUM 11, but is only taking two:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Table_1.jpg" style="width: 845px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/107673iE5514A9D00BFC1EF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Table_1.jpg" alt="Table_1.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Table_2.jpg" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/107674i31A6800BD459D462/image-size/large?v=v2&amp;amp;px=999" role="button" title="Table_2.jpg" alt="Table_2.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 11:26:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Accumulative-sum-leaser-or-first-greater-than-value/m-p/2073802#M88073</guid>
      <dc:creator>oscarvictory</dc:creator>
      <dc:date>2023-05-22T11:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulative sum leaser or first greater than value</title>
      <link>https://community.qlik.com/t5/App-Development/Accumulative-sum-leaser-or-first-greater-than-value/m-p/2073817#M88074</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/5163"&gt;@oscarvictory&lt;/a&gt;&amp;nbsp; As per your example, is it not 5+10=15 which is already more than stock so should be two lines? In your original post example as well for product 98654, (2+5+7 =14) which is more than stock 8. Am I missing something?&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 11:47:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Accumulative-sum-leaser-or-first-greater-than-value/m-p/2073817#M88074</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2023-05-22T11:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulative sum leaser or first greater than value</title>
      <link>https://community.qlik.com/t5/App-Development/Accumulative-sum-leaser-or-first-greater-than-value/m-p/2073918#M88081</link>
      <description>&lt;P&gt;Yes&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;, I will try to explain better.&lt;/P&gt;
&lt;P&gt;ACCUM means:&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Table_3.jpg" style="width: 846px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/107705i4167EFAB1F3171A8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Table_3.jpg" alt="Table_3.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So, if STOCK is 11 it must take the first three lines, if STOCK was 12 it should include the fourth line.&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 14:22:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Accumulative-sum-leaser-or-first-greater-than-value/m-p/2073918#M88081</guid>
      <dc:creator>oscarvictory</dc:creator>
      <dc:date>2023-05-22T14:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulative sum leaser or first greater than value</title>
      <link>https://community.qlik.com/t5/App-Development/Accumulative-sum-leaser-or-first-greater-than-value/m-p/2073928#M88082</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/5163"&gt;@oscarvictory&lt;/a&gt;&amp;nbsp; try below. Highlighted in Green you can replace it with measure you want to show. Suppose you want to show ACCUM , so replace it with below&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;sum(aggr(rangesum(above(total &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Sum(Qty)&lt;/STRONG&gt;&lt;/FONT&gt;,0,RowNo())), PRODUCT,(RCV_DATE,(NUMERIC,DESCENDING))))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;=if(aggr(rangesum(above(total &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Sum(Qty)&lt;/STRONG&gt;&lt;/FONT&gt;,0,RowNo())), PRODUCT,(RCV_DATE,(NUMERIC,DESCENDING))) &amp;lt;= min(total &amp;lt;PRODUCT&amp;gt;aggr(if(rangesum(above(total &lt;FONT color="#FF0000"&gt;Sum(Qty),&lt;/FONT&gt;0,RowNo())) &amp;gt; = sum(STOCK),rangesum(above(total &lt;FONT color="#FF0000"&gt;Sum(Qty),&lt;/FONT&gt;0,RowNo()))), PRODUCT,(RCV_DATE,(NUMERIC,DESCENDING)))),&lt;/SPAN&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#339966"&gt;Sum(Stock)&lt;/FONT&gt;&lt;FONT color="#000000"&gt;,&lt;/FONT&gt;&lt;/FONT&gt;&lt;SPAN&gt;0)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2023 09:14:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Accumulative-sum-leaser-or-first-greater-than-value/m-p/2073928#M88082</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2023-05-23T09:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulative sum leaser or first greater than value</title>
      <link>https://community.qlik.com/t5/App-Development/Accumulative-sum-leaser-or-first-greater-than-value/m-p/2073965#M88086</link>
      <description>&lt;P&gt;Well, finally I add an equal to the comparison symbol and it worked as expected!!&lt;/P&gt;
&lt;P&gt;Thank you very much!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;=if(aggr(rangesum(above(total&amp;nbsp;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Sum(Qty)&lt;/STRONG&gt;&lt;/FONT&gt;,0,RowNo())), PRODUCT,(RCV_DATE,(NUMERIC,DESCENDING))) &amp;lt;= min(total &amp;lt;PRODUCT&amp;gt;aggr(if(rangesum(above(total&amp;nbsp;&lt;FONT color="#FF0000"&gt;Sum(Qty),&lt;/FONT&gt;0,RowNo())) &amp;gt; &lt;FONT size="6"&gt;&lt;STRONG&gt;=&lt;/STRONG&gt;&lt;/FONT&gt; sum(STOCK),rangesum(above(total&amp;nbsp;&lt;FONT color="#FF0000"&gt;Sum(Qty),&lt;/FONT&gt;0,RowNo()))), PRODUCT,(RCV_DATE,(NUMERIC,DESCENDING)))),&lt;/SPAN&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#339966"&gt;Sum(Stock)&lt;/FONT&gt;&lt;FONT color="#000000"&gt;,&lt;/FONT&gt;&lt;/FONT&gt;&lt;SPAN&gt;0)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 16:19:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Accumulative-sum-leaser-or-first-greater-than-value/m-p/2073965#M88086</guid>
      <dc:creator>oscarvictory</dc:creator>
      <dc:date>2023-05-22T16:19:11Z</dc:date>
    </item>
  </channel>
</rss>

