<?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 Cumulative Metric in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Cumulative-Metric/m-p/2530222#M107776</link>
    <description>&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;Hi everyone,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;I am building a cumulative metric in Qlik Sense that needs to be calculated by Material and Expiration Date.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;The requirement is that the calculation should accumulate correctly by Material and Expiration Date, but without the Warehouse field resetting the accumulation. In addition, this accumulation should be performed for each Material in ascending order of Expiration Date.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;I have tried using a RangeSum(Above(...)) over the metric to be accumulated, as well as over an Aggr() of that metric:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;RangeSum(Above(Sum(Unidades), 0, RowNo()))&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;RangeSum(Above(Aggr(Sum(Unidades), Material, ExpirationDate), 0, RowNo()))&lt;/P&gt;&lt;P&gt;If I remove the &lt;STRONG&gt;Warehouse&lt;/STRONG&gt; field from the table, the accumulation works correctly, but then I lose the Warehouse detail.&lt;/P&gt;&lt;P&gt;I cannot get the RangeSum to only respect &lt;STRONG&gt;Material + Expiration Date&lt;/STRONG&gt; as the main grouping, while ignoring Warehouse.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fran12_0-1757424584162.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/183526i1AFD3ED23C24DAA1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Fran12_0-1757424584162.png" alt="Fran12_0-1757424584162.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As shown in the image, the RowNo() does not behave as expected for this accumulation. The metric should keep accumulating the values of the 4th column up to the fourth row and, on the fifth row, reset and start summing the accumulated Units for the next Material.&lt;/P&gt;&lt;P&gt;Does anyone know how to force RangeSum() to group only by &lt;STRONG&gt;Material + Expiration Date&lt;/STRONG&gt;, ignoring &lt;STRONG&gt;Warehouse&lt;/STRONG&gt;, while still keeping Warehouse in the table?&lt;/P&gt;&lt;P&gt;Thanks a lot in advance!&lt;/P&gt;</description>
    <pubDate>Tue, 09 Sep 2025 13:29:57 GMT</pubDate>
    <dc:creator>Fran12</dc:creator>
    <dc:date>2025-09-09T13:29:57Z</dc:date>
    <item>
      <title>Cumulative Metric</title>
      <link>https://community.qlik.com/t5/App-Development/Cumulative-Metric/m-p/2530222#M107776</link>
      <description>&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;Hi everyone,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;I am building a cumulative metric in Qlik Sense that needs to be calculated by Material and Expiration Date.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;The requirement is that the calculation should accumulate correctly by Material and Expiration Date, but without the Warehouse field resetting the accumulation. In addition, this accumulation should be performed for each Material in ascending order of Expiration Date.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;I have tried using a RangeSum(Above(...)) over the metric to be accumulated, as well as over an Aggr() of that metric:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;RangeSum(Above(Sum(Unidades), 0, RowNo()))&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;RangeSum(Above(Aggr(Sum(Unidades), Material, ExpirationDate), 0, RowNo()))&lt;/P&gt;&lt;P&gt;If I remove the &lt;STRONG&gt;Warehouse&lt;/STRONG&gt; field from the table, the accumulation works correctly, but then I lose the Warehouse detail.&lt;/P&gt;&lt;P&gt;I cannot get the RangeSum to only respect &lt;STRONG&gt;Material + Expiration Date&lt;/STRONG&gt; as the main grouping, while ignoring Warehouse.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fran12_0-1757424584162.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/183526i1AFD3ED23C24DAA1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Fran12_0-1757424584162.png" alt="Fran12_0-1757424584162.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As shown in the image, the RowNo() does not behave as expected for this accumulation. The metric should keep accumulating the values of the 4th column up to the fourth row and, on the fifth row, reset and start summing the accumulated Units for the next Material.&lt;/P&gt;&lt;P&gt;Does anyone know how to force RangeSum() to group only by &lt;STRONG&gt;Material + Expiration Date&lt;/STRONG&gt;, ignoring &lt;STRONG&gt;Warehouse&lt;/STRONG&gt;, while still keeping Warehouse in the table?&lt;/P&gt;&lt;P&gt;Thanks a lot in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 09 Sep 2025 13:29:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Cumulative-Metric/m-p/2530222#M107776</guid>
      <dc:creator>Fran12</dc:creator>
      <dc:date>2025-09-09T13:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Metric</title>
      <link>https://community.qlik.com/t5/App-Development/Cumulative-Metric/m-p/2530290#M107789</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/180768"&gt;@Fran12&lt;/a&gt;&amp;nbsp;&lt;A href="https://www.aes-success.com" target="_blank" rel="noopener"&gt;AES Success&lt;/A&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;Hi everyone,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;I am building a cumulative metric in Qlik Sense that needs to be calculated by Material and Expiration Date.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;The requirement is that the calculation should accumulate correctly by Material and Expiration Date, but without the Warehouse field resetting the accumulation. In addition, this accumulation should be performed for each Material in ascending order of Expiration Date.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;I have tried using a RangeSum(Above(...)) over the metric to be accumulated, as well as over an Aggr() of that metric:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;RangeSum(Above(Sum(Unidades), 0, RowNo()))&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;RangeSum(Above(Aggr(Sum(Unidades), Material, ExpirationDate), 0, RowNo()))&lt;/P&gt;
&lt;P&gt;If I remove the &lt;STRONG&gt;Warehouse&lt;/STRONG&gt; field from the table, the accumulation works correctly, but then I lose the Warehouse detail.&lt;/P&gt;
&lt;P&gt;I cannot get the RangeSum to only respect &lt;STRONG&gt;Material + Expiration Date&lt;/STRONG&gt; as the main grouping, while ignoring Warehouse.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fran12_0-1757424584162.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/183526i1AFD3ED23C24DAA1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Fran12_0-1757424584162.png" alt="Fran12_0-1757424584162.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As shown in the image, the RowNo() does not behave as expected for this accumulation. The metric should keep accumulating the values of the 4th column up to the fourth row and, on the fifth row, reset and start summing the accumulated Units for the next Material.&lt;/P&gt;
&lt;P&gt;Does anyone know how to force RangeSum() to group only by &lt;STRONG&gt;Material + Expiration Date&lt;/STRONG&gt;, ignoring &lt;STRONG&gt;Warehouse&lt;/STRONG&gt;, while still keeping Warehouse in the table?&lt;/P&gt;
&lt;P&gt;Thanks a lot in advance!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/180768"&gt;@Fran12&lt;/a&gt;,&lt;BR /&gt;Use this expression:&lt;/P&gt;
&lt;P&gt;```qlik&lt;BR /&gt;RangeSum(&lt;BR /&gt;Above(&lt;BR /&gt;Sum(Unidades),&lt;BR /&gt;0,&lt;BR /&gt;RowNo(TOTAL)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;```&lt;/P&gt;
&lt;P&gt;Then wrap it in an `Aggr()` like this:&lt;/P&gt;
&lt;P&gt;```qlik&lt;BR /&gt;Aggr(&lt;BR /&gt;RangeSum(&lt;BR /&gt;Above(&lt;BR /&gt;Sum(Unidades),&lt;BR /&gt;0,&lt;BR /&gt;RowNo(TOTAL)&lt;BR /&gt;)&lt;BR /&gt;),&lt;BR /&gt;Material,&lt;BR /&gt;ExpirationDate&lt;BR /&gt;)&lt;BR /&gt;```&lt;/P&gt;
&lt;P&gt;This ensures accumulation by `Material + ExpirationDate`, ignoring `Warehouse`, while keeping Warehouse in the table. Use `RowNo(TOTAL)` to prevent resets caused by extra dimensions.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;James Patton&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2025 04:06:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Cumulative-Metric/m-p/2530290#M107789</guid>
      <dc:creator>james598patton</dc:creator>
      <dc:date>2025-09-10T04:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Metric</title>
      <link>https://community.qlik.com/t5/App-Development/Cumulative-Metric/m-p/2530315#M107794</link>
      <description>&lt;P&gt;The problem with that metric is that it doesn’t add up record by record the value of each cumulative. The formula you mention looks like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fran12_0-1757488740468.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/183552i8230374C29DFE8E9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Fran12_0-1757488740468.png" alt="Fran12_0-1757488740468.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I want it to accumulate in each record and only reset when we switch to a different Material.&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2025 07:20:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Cumulative-Metric/m-p/2530315#M107794</guid>
      <dc:creator>Fran12</dc:creator>
      <dc:date>2025-09-10T07:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Metric</title>
      <link>https://community.qlik.com/t5/App-Development/Cumulative-Metric/m-p/2530774#M107865</link>
      <description>&lt;P&gt;The specification sounds like something one would create in Excel spreadsheets and then wants it in Qlik. Anyways, it might be useful to take a look into&amp;nbsp;&lt;A title="Chart level scripting" href="https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/chart-level-scripting.htm" target="_blank" rel="noopener"&gt;Chart level scripting&lt;/A&gt;&amp;nbsp;. Using this feature you can access the hypercube and modify it, create new rows etc.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Sep 2025 06:52:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Cumulative-Metric/m-p/2530774#M107865</guid>
      <dc:creator>ollis</dc:creator>
      <dc:date>2025-09-15T06:52:13Z</dc:date>
    </item>
  </channel>
</rss>

