<?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: Using accumulation in expressions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-accumulation-in-expressions/m-p/818106#M533358</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's my example app where I combined the solution concepts mentioned above into a single app with dynamic thresholds (configurable via slider and input box) including a calculated dimension to reflect the price groups (similar to ABC / Pareto analyses). !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Pareto_View&amp;amp;amp;Select.PNG" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/81383_Pareto_View&amp;amp;Select.PNG" style="height: 370px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Mar 2015 10:51:20 GMT</pubDate>
    <dc:creator>Matthias_Herkommer</dc:creator>
    <dc:date>2015-03-20T10:51:20Z</dc:date>
    <item>
      <title>Using accumulation in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Using-accumulation-in-expressions/m-p/818101#M533349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;I have got a list of items sold at a certain price and volume (#units), resulting in the corresponding revenue (price * units, see e.g. first table).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;Now I would like to calculate the price level where the accumulated revenue (running total) is at least 20% of the total revenue. (which is “price = 9” in the example, see second table). I need this value for further visualizations.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;At the moment I am struggling to calculate the accumulated revenue and use it inside an expression (formula).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;IMG __jive_id="80911" alt="table3.jpg" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/80911_table3.jpg" style="height: auto;" /&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;IMG __jive_id="80942" alt="table4.jpg" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/80942_table4.jpg" style="height: auto;" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;IMG /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Mar 2015 10:28:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-accumulation-in-expressions/m-p/818101#M533349</guid>
      <dc:creator />
      <dc:date>2015-03-17T10:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using accumulation in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Using-accumulation-in-expressions/m-p/818102#M533351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Somehow I am unable to understand the link between your first table and your second table. Item 1 priced 10 and 18 units are sold. But in your second table you are showing Sum(Revenue) = 9? Can you help me understand what is the link between the above two tables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Mar 2015 10:36:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-accumulation-in-expressions/m-p/818102#M533351</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-03-17T10:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using accumulation in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Using-accumulation-in-expressions/m-p/818103#M533353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Table 2 shows the revenue generated with all items at a certain price level, e.g. for price = 1 we have revenue = 9 (item15), for price = 6&amp;nbsp; we have revnue = 48 + 18 + 114 = 180 (item4 + item6 + item17). Price is taken as a dimension in that case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Mar 2015 10:45:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-accumulation-in-expressions/m-p/818103#M533353</guid>
      <dc:creator />
      <dc:date>2015-03-17T10:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: Using accumulation in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Using-accumulation-in-expressions/m-p/818104#M533355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a tricky one ...&lt;/P&gt;&lt;P&gt;You need a new field in the data model that lists all distinct values of prices SORTED!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD DISTINCT&lt;/P&gt;&lt;P&gt;&amp;nbsp; Price, Price AS PriceSorted&lt;/P&gt;&lt;P&gt;RESIDENT data&lt;/P&gt;&lt;P&gt;ORDER BY Price;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="81272" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/81272_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;Then you can use the following set-modifier to refer to the middle cumulated 60% (&amp;gt;=20%, &amp;lt;=80%) according to revenue (Price * Units):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;lt;PriceSorted = {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; "=Aggr( RangeSum(Sum(Units * Price) / Sum(TOTAL Units * Price), Above(Column(1))) ,PriceSorted) &amp;gt; 0.2 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; AND Aggr( RangeSum(Sum(Units * Price) / Sum(TOTAL Units * Price), Above(Column(1))) ,PriceSorted) &amp;lt; 0.8"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;}&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ideally, save this into a variable and refer to it wherever needed:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;In a grand total in a text box&lt;/LI&gt;&lt;LI&gt;Select the middle 60% prices&lt;/LI&gt;&lt;LI&gt;Name the upper / lower prices within that middle 60% range&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(No need for macro, no need for alternate state, always recalculating relative to your selection.)&lt;/P&gt;&lt;P&gt;See attached file&lt;/P&gt;&lt;P&gt;&lt;IMG /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="81273" class="jive-image image-2" height="475" src="https://community.qlik.com/legacyfs/online/81273_pastedImage_2.png" style="max-width: 1200px; max-height: 900px; width: 745px; height: 474.754901960784px;" width="745" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2015 10:56:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-accumulation-in-expressions/m-p/818104#M533355</guid>
      <dc:creator>ChristofSchwarz</dc:creator>
      <dc:date>2015-03-19T10:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: Using accumulation in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Using-accumulation-in-expressions/m-p/818105#M533357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again for your effort and the solution! Good to see that inter-record functions also work inside AGGR.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2015 15:12:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-accumulation-in-expressions/m-p/818105#M533357</guid>
      <dc:creator />
      <dc:date>2015-03-19T15:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using accumulation in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Using-accumulation-in-expressions/m-p/818106#M533358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's my example app where I combined the solution concepts mentioned above into a single app with dynamic thresholds (configurable via slider and input box) including a calculated dimension to reflect the price groups (similar to ABC / Pareto analyses). !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Pareto_View&amp;amp;amp;Select.PNG" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/81383_Pareto_View&amp;amp;Select.PNG" style="height: 370px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2015 10:51:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-accumulation-in-expressions/m-p/818106#M533358</guid>
      <dc:creator>Matthias_Herkommer</dc:creator>
      <dc:date>2015-03-20T10:51:20Z</dc:date>
    </item>
  </channel>
</rss>

