<?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 Accumulating sorted values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Accumulating-sorted-values/m-p/173144#M42440</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. This may seem like a simple question but how do I go about reporting this as a bug to QlikTech?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Sep 2009 02:03:14 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-09-03T02:03:14Z</dc:date>
    <item>
      <title>Accumulating sorted values</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulating-sorted-values/m-p/173139#M42435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I have a chart that has two dimensions - Product Group and Item and some expressions (sales, cost, etc) that are the sum of a selected date range. Then I have two other expressions that sum the current value for the item based on the date entered regardless of the date range entered for the sales data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;month_end_date=&amp;gt;} if(current_value_date = CurValDate, current_value_at_cost))&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt; line-height: normal; mso-layout-grid-align: none;"&gt;I am sorting this expression (Current Value) in descending value within Product Group. Then I have the same expression that I want to use to have a running accumulation total of the current value (Accum Value). My chart should look like this:&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Product Group Item Sales Cost GM$ Current Value Accum Value&lt;/P&gt;&lt;P&gt;ABC 12345 $100 $80 $20 $500 $500&lt;/P&gt;&lt;P&gt;ABC 33445 $300 $200 $100 $350 $850&lt;/P&gt;&lt;P&gt;ABC 56789 $50 $30 $20 $100 $950&lt;/P&gt;&lt;P&gt;Etc.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt; line-height: normal; mso-layout-grid-align: none;"&gt;The problem is when I mark the Accum Value expression for Full Accumulation it doesn't accumulate a running total, it only gives me the value of that one line in the chart. I tried using a rangesum(above()) function but couldn't get it to work either. Of course I don't quite understand that function entirely.&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt; line-height: normal; mso-layout-grid-align: none;"&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt; line-height: normal; mso-layout-grid-align: none;"&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt; line-height: normal; mso-layout-grid-align: none;"&gt;Thanks in advance.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2009 03:31:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulating-sorted-values/m-p/173139#M42435</guid>
      <dc:creator />
      <dc:date>2009-09-02T03:31:48Z</dc:date>
    </item>
    <item>
      <title>Accumulating sorted values</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulating-sorted-values/m-p/173140#M42436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;would be great if you could post an example...&lt;/P&gt;&lt;P&gt;If I understand your description correctly, you are trying to use both "Full Accumulation" feature and the function above()... In order to calculate a running total, you need to use either one or another...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Use a "regular" expression, and check "Full Aggregation" on the Expressions Properties. If for some reason accumulation does not produce expected results (maybe something about your Set Analysis expression?), you can calculate accumulated value by yourself, using function above() - something along the lines of:&lt;/P&gt;&lt;P&gt;if ( rowno() = 1, Column(3), Column(3) + above(column(4)))&lt;/P&gt;&lt;P&gt;, where column 3 is the expression and column 4 is the same expression only accumulated. Accumulation happens due to the use of function above() that returns the previous valye of the running total.&lt;/P&gt;&lt;P&gt;cheers!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oleg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV id="refHTML"&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2009 04:36:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulating-sorted-values/m-p/173140#M42436</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2009-09-02T04:36:09Z</dc:date>
    </item>
    <item>
      <title>Accumulating sorted values</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulating-sorted-values/m-p/173141#M42437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Oleg,&lt;/P&gt;&lt;P&gt;I actually am not trying to do both "Full Accumulation" and the above() function together. I was going between the two to see if either would give me the desired result. I did get the above() function to work thanks to your suggestion however it changes my sort order for the "Current Value" column (the column I'm accumulating). I would like that column sorted in descending order and the accumulation column a running total of those sorted values. It seems I can get the values to sort in descending order when I use Full Accumulation, however the accumulation doesn't work. Or I can use the above() function to get the accumulation to work but the sorting is wrong. Not sure why I can't get the two to work together.&lt;/P&gt;&lt;P&gt;I attached two examples, one with Full Acuumulation (not working) and it sorting correctly (called "full_accum") and the other with the accumulation working using the above() function but with it sorting wrong (called "above_accum").&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2009 20:16:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulating-sorted-values/m-p/173141#M42437</guid>
      <dc:creator />
      <dc:date>2009-09-02T20:16:30Z</dc:date>
    </item>
    <item>
      <title>Accumulating sorted values</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulating-sorted-values/m-p/173142#M42438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's the other example. For some reason I can't figure out how to upload more than one file per reply???&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2009 20:18:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulating-sorted-values/m-p/173142#M42438</guid>
      <dc:creator />
      <dc:date>2009-09-02T20:18:06Z</dc:date>
    </item>
    <item>
      <title>Accumulating sorted values</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulating-sorted-values/m-p/173143#M42439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I looked at both of your examples, and it looks like there is a bug, or maybe even a couple of them:&lt;/P&gt;&lt;P&gt;- the "Full Accumulation" works for a single dimension (Item), or for two dimensions if Item is the first. As soon as the Group becomes the first dimension, the full accumulation stops working&lt;/P&gt;&lt;P&gt;- adding the expression that's using "above(), is messing up the sort order - looks like another bug.&lt;/P&gt;&lt;P&gt;I'd strongly recommend to send both of your sample to QlikTech as a bug report.&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;P&gt;Oleg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV id="refHTML"&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2009 23:10:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulating-sorted-values/m-p/173143#M42439</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2009-09-02T23:10:52Z</dc:date>
    </item>
    <item>
      <title>Accumulating sorted values</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulating-sorted-values/m-p/173144#M42440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. This may seem like a simple question but how do I go about reporting this as a bug to QlikTech?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2009 02:03:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulating-sorted-values/m-p/173144#M42440</guid>
      <dc:creator />
      <dc:date>2009-09-03T02:03:14Z</dc:date>
    </item>
  </channel>
</rss>

