<?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 RangeSum Issues for a Reverse Accumulation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/RangeSum-Issues-for-a-Reverse-Accumulation/m-p/388622#M559054</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm working on an inventory valuation historical trending chart, rolling 12 months, by warehouse.&amp;nbsp; The current total values are known, and we're working backward with an accumulation of the transactions to see the trended warehouse totals for prior months.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because I'm using a single total as the starting value, the standard QlikView Accumulation feature cannot be used.&amp;nbsp; So, I've started with the total and added (because transactions out are negative) the RangeSum accumulation value for each period, as follows:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;=Sum (TOTAL &amp;lt;Whse&amp;gt; (WarehouseQtyOnHand * WarehouseCurrentCostUSD) / StockPricePer)&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;rangesum (below(TOTAL&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum ({$&amp;lt;Period = {"&amp;lt;=$(MONTHSTART(Date))"}&amp;gt;} StockTranQuantity * WarehouseCurrentCostUSD)&lt;/P&gt;&lt;P&gt;,0,12))&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;This works perfectly when a single warehouse is selected:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="41362" class="jive-image" alt="RangeSum - Single Warehouse.png" src="/legacyfs/online/41362_RangeSum - Single Warehouse.png" /&gt;&lt;/P&gt;&lt;P&gt;But, when I de-select the single warehouse filter, the line changes considerably (second line from the top, same red/pink color):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="41366" class="jive-image" alt="RangeSum - Multiple Warehouses.png" src="/legacyfs/online/41366_RangeSum - Multiple Warehouses.png" /&gt;&lt;/P&gt;&lt;P&gt;My guess is it's some strange way that RangeSum looks at the data, looking across the warehouses, instead of down each.&amp;nbsp; I've tried various combinations of wrapping the Rangesum calculation in the AGGR function, by warehouse, hoping that this would keep Warehouse data streams separate, but it didn't appear to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone dealt with a similar issue?&amp;nbsp; How did you overcome it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;DJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 May 2013 03:32:54 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-05-21T03:32:54Z</dc:date>
    <item>
      <title>RangeSum Issues for a Reverse Accumulation</title>
      <link>https://community.qlik.com/t5/QlikView/RangeSum-Issues-for-a-Reverse-Accumulation/m-p/388622#M559054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm working on an inventory valuation historical trending chart, rolling 12 months, by warehouse.&amp;nbsp; The current total values are known, and we're working backward with an accumulation of the transactions to see the trended warehouse totals for prior months.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because I'm using a single total as the starting value, the standard QlikView Accumulation feature cannot be used.&amp;nbsp; So, I've started with the total and added (because transactions out are negative) the RangeSum accumulation value for each period, as follows:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;=Sum (TOTAL &amp;lt;Whse&amp;gt; (WarehouseQtyOnHand * WarehouseCurrentCostUSD) / StockPricePer)&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;rangesum (below(TOTAL&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum ({$&amp;lt;Period = {"&amp;lt;=$(MONTHSTART(Date))"}&amp;gt;} StockTranQuantity * WarehouseCurrentCostUSD)&lt;/P&gt;&lt;P&gt;,0,12))&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;This works perfectly when a single warehouse is selected:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="41362" class="jive-image" alt="RangeSum - Single Warehouse.png" src="/legacyfs/online/41362_RangeSum - Single Warehouse.png" /&gt;&lt;/P&gt;&lt;P&gt;But, when I de-select the single warehouse filter, the line changes considerably (second line from the top, same red/pink color):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="41366" class="jive-image" alt="RangeSum - Multiple Warehouses.png" src="/legacyfs/online/41366_RangeSum - Multiple Warehouses.png" /&gt;&lt;/P&gt;&lt;P&gt;My guess is it's some strange way that RangeSum looks at the data, looking across the warehouses, instead of down each.&amp;nbsp; I've tried various combinations of wrapping the Rangesum calculation in the AGGR function, by warehouse, hoping that this would keep Warehouse data streams separate, but it didn't appear to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone dealt with a similar issue?&amp;nbsp; How did you overcome it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;DJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 03:32:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/RangeSum-Issues-for-a-Reverse-Accumulation/m-p/388622#M559054</guid>
      <dc:creator />
      <dc:date>2013-05-21T03:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: RangeSum Issues for a Reverse Accumulation</title>
      <link>https://community.qlik.com/t5/QlikView/RangeSum-Issues-for-a-Reverse-Accumulation/m-p/388623#M559055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the same kind of issue can you please guide me in case of rangesum when the value is negative it does not calculate properly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jan 2017 09:42:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/RangeSum-Issues-for-a-Reverse-Accumulation/m-p/388623#M559055</guid>
      <dc:creator>aniketsr</dc:creator>
      <dc:date>2017-01-16T09:42:23Z</dc:date>
    </item>
  </channel>
</rss>

