<?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 Running/Cumulative Total Calculations in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Running-Cumulative-Total-Calculations/m-p/761206#M471482</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using QV to calculate impact of the spare part and service costs compared to the production.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My raw data has Product, Month, Year, Supplier, Production, Service &amp;amp; Spares.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each product, I want to calculate the impact of spare parts and service cost compared to the production level and how it change month by month.&lt;/P&gt;&lt;P&gt;By using a Pivot Chart, I can obtain exactly what I looking for.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="PivotChart.JPG" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/80201_PivotChart.JPG" style="height: 371px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I want to put in a line chart the column "cost / 1000", the cumulative functionality is not working anymore.&lt;/P&gt;&lt;P&gt;The formula I am using for Cost / 1000 is:&lt;/P&gt;&lt;P&gt;if(rangesum(above(sum(Production),0,RowNo()))=0,0,(rangesum(above(sum(Service),0,RowNo()))+rangesum(above(sum(Spare),0,RowNo())))*1000/rangesum(above(sum(Production),0,RowNo())))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if the formula used for the line chart should be different.&lt;/P&gt;&lt;P&gt;What I want to obtain is:&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/80202_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Felipe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 07 Mar 2015 10:45:09 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-03-07T10:45:09Z</dc:date>
    <item>
      <title>Running/Cumulative Total Calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Running-Cumulative-Total-Calculations/m-p/761206#M471482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using QV to calculate impact of the spare part and service costs compared to the production.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My raw data has Product, Month, Year, Supplier, Production, Service &amp;amp; Spares.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each product, I want to calculate the impact of spare parts and service cost compared to the production level and how it change month by month.&lt;/P&gt;&lt;P&gt;By using a Pivot Chart, I can obtain exactly what I looking for.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="PivotChart.JPG" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/80201_PivotChart.JPG" style="height: 371px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I want to put in a line chart the column "cost / 1000", the cumulative functionality is not working anymore.&lt;/P&gt;&lt;P&gt;The formula I am using for Cost / 1000 is:&lt;/P&gt;&lt;P&gt;if(rangesum(above(sum(Production),0,RowNo()))=0,0,(rangesum(above(sum(Service),0,RowNo()))+rangesum(above(sum(Spare),0,RowNo())))*1000/rangesum(above(sum(Production),0,RowNo())))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if the formula used for the line chart should be different.&lt;/P&gt;&lt;P&gt;What I want to obtain is:&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/80202_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Felipe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Mar 2015 10:45:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Running-Cumulative-Total-Calculations/m-p/761206#M471482</guid>
      <dc:creator />
      <dc:date>2015-03-07T10:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: Running/Cumulative Total Calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Running-Cumulative-Total-Calculations/m-p/761207#M471483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps this document helps: &lt;A _jive_internal="true" href="https://community.qlik.com/docs/DOC-4252" style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3778c7;"&gt;Calculating rolling n-period totals, averages or other aggregations&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If not, please post a qlikview document that demonstrates the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 15:10:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Running-Cumulative-Total-Calculations/m-p/761207#M471483</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-03-09T15:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: Running/Cumulative Total Calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Running-Cumulative-Total-Calculations/m-p/761208#M471484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe my similar issue can help you out. Using AsOfTables is a smart way to control your cumulations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/thread/143975"&gt;http://community.qlik.com/thread/143975&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 15:26:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Running-Cumulative-Total-Calculations/m-p/761208#M471484</guid>
      <dc:creator>linusblomberg</dc:creator>
      <dc:date>2015-03-09T15:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: Running/Cumulative Total Calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Running-Cumulative-Total-Calculations/m-p/761209#M471485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;of course it was @&lt;STRONG style="font-size: 11.6999998092651px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://community.qlik.com/people/gwassenaar"&gt;gwassenaar&lt;/A&gt;&lt;/STRONG&gt; who help me out that time... Thanks again...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 15:28:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Running-Cumulative-Total-Calculations/m-p/761209#M471485</guid>
      <dc:creator>linusblomberg</dc:creator>
      <dc:date>2015-03-09T15:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Running/Cumulative Total Calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Running-Cumulative-Total-Calculations/m-p/761210#M471486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Gysbert&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached you can find a QV file on which you can see a pivot chart and a line chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will like to put on the line chart the column "Cost / 1000" of the pivot chart but when I use the same expression, the Line chart doesn't show the cumulative results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(RangeSum(above(sum(Production),0,12))=0,0,&lt;/P&gt;&lt;P&gt;(RangeSum(above(sum(Service),0,12))+RangeSum(above(sum(Spare),0,12)))*1000 / RangeSum(above(sum(Production),0,12)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure if the formula can be used also on a line chart.&lt;/P&gt;&lt;P&gt;Please let me know.&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Felipe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2015 14:05:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Running-Cumulative-Total-Calculations/m-p/761210#M471486</guid>
      <dc:creator />
      <dc:date>2015-03-10T14:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Running/Cumulative Total Calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Running-Cumulative-Total-Calculations/m-p/761211#M471487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use "before" instead of "above" in a chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If(RangeSum(&lt;SPAN style="font-size: 13.3333330154419px;"&gt;before&lt;/SPAN&gt;(sum(Production),0,12))=0,0,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(RangeSum(&lt;SPAN style="font-size: 13.3333330154419px;"&gt;before&lt;/SPAN&gt;(sum(Service),0,12))+RangeSum(&lt;SPAN style="font-size: 13.3333330154419px;"&gt;before&lt;/SPAN&gt;(sum(Spare),0,12)))*1000 / RangeSum(&lt;SPAN style="font-size: 13.3333330154419px;"&gt;before&lt;/SPAN&gt;(sum(Production),0,12)))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2015 14:09:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Running-Cumulative-Total-Calculations/m-p/761211#M471487</guid>
      <dc:creator>linusblomberg</dc:creator>
      <dc:date>2015-03-10T14:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Running/Cumulative Total Calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Running-Cumulative-Total-Calculations/m-p/761212#M471488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Linus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried using "before" instead of "above" with no results...(no lines in the chart).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2015 14:27:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Running-Cumulative-Total-Calculations/m-p/761212#M471488</guid>
      <dc:creator />
      <dc:date>2015-03-10T14:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: Running/Cumulative Total Calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Running-Cumulative-Total-Calculations/m-p/761213#M471489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have solved this issue using AsOf tables.&lt;/P&gt;&lt;P&gt;See as reference: &lt;A href="https://community.qlik.com/thread/143975"&gt;Advanced accumulation with nullvalues&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In Particular I did this:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;L&lt;/EM&gt;&lt;EM&gt;oad&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;CPeriod as CumPeriod,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;AddMonths(CPeriod,1-IterNo()) as CPeriod&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident ProdData&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;While IterNo()&amp;lt;=12;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the Line chart, I change the Dimension from CPeriod to CumPeriod and the expresion become very simple:&lt;/P&gt;&lt;P&gt;(Sum(Service)+Sum(Spare)) * 1000 / sum(production).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2015 12:53:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Running-Cumulative-Total-Calculations/m-p/761213#M471489</guid>
      <dc:creator />
      <dc:date>2015-03-13T12:53:34Z</dc:date>
    </item>
  </channel>
</rss>

