<?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: Cumulative with Multiplier in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Cumulative-with-Multiplier/m-p/1818709#M67113</link>
    <description>&lt;P&gt;added what I was working on as a QVF if anyone is willing to take a stab.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Jun 2021 21:07:53 GMT</pubDate>
    <dc:creator>scottokeefe14</dc:creator>
    <dc:date>2021-06-29T21:07:53Z</dc:date>
    <item>
      <title>Cumulative with Multiplier</title>
      <link>https://community.qlik.com/t5/App-Development/Cumulative-with-Multiplier/m-p/1818619#M67091</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am making a retirement calculator of sorts where a user inputs their age, rate, expected growth, etc. I am having trouble getting the rate of return to multiple against the previous years balance. I believe the correct answer would look like this in excel:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="scottokeefe14_0-1624980129094.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/57724i3F63FD9D78DFAD39/image-size/medium?v=v2&amp;amp;px=400" role="button" title="scottokeefe14_0-1624980129094.png" alt="scottokeefe14_0-1624980129094.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when trying in qlik sense I get the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="scottokeefe14_1-1624980244630.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/57725i020272A195511216/image-size/medium?v=v2&amp;amp;px=400" role="button" title="scottokeefe14_1-1624980244630.png" alt="scottokeefe14_1-1624980244630.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;the first column includes the 8% annual return, and shows that the initial contribution matches. The Second doesnt include it, but does not match after the initial contribution obviously. Here are the respective formulas. I am using variable sliders to let the user control:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;rangesum(above(if((ValueLoop($(Age),$(RetAge),1) - $(Age))=0,$(CurrentBalance),&lt;/P&gt;&lt;P&gt;($(CurrentBalance) +&lt;/P&gt;&lt;P&gt;($(Salary)*&lt;BR /&gt;(pow(&lt;BR /&gt;(1+$(SalaryIncrease)),(ValueLoop($(Age),$(RetAge),1) - $(Age))&lt;BR /&gt;))*&lt;BR /&gt;$(Contribution)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;*&lt;BR /&gt;(1+$(AnnualReturn))&lt;/P&gt;&lt;P&gt;),0,rowno()))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've also tried using the above function without rangesum but it takes the calculated value of the above cell and not the cumulative to include its above call.&lt;/P&gt;&lt;P&gt;I feel like there is a simple answer I'm overlooking and appreciate any help you can give.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2021 15:27:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Cumulative-with-Multiplier/m-p/1818619#M67091</guid>
      <dc:creator>scottokeefe14</dc:creator>
      <dc:date>2021-06-29T15:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative with Multiplier</title>
      <link>https://community.qlik.com/t5/App-Development/Cumulative-with-Multiplier/m-p/1818649#M67097</link>
      <description>&lt;P&gt;I guess just to add, anything that would give me (previous cell * the rate of return) + current period contribution&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2021 17:11:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Cumulative-with-Multiplier/m-p/1818649#M67097</guid>
      <dc:creator>scottokeefe14</dc:creator>
      <dc:date>2021-06-29T17:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative with Multiplier</title>
      <link>https://community.qlik.com/t5/App-Development/Cumulative-with-Multiplier/m-p/1818677#M67105</link>
      <description>&lt;P&gt;try&amp;nbsp; rangesum(above(yourexpressionHere),0,3)&amp;nbsp; not rowno()&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense/May2021/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/rangesum.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense/May2021/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/rangesum.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2021 18:37:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Cumulative-with-Multiplier/m-p/1818677#M67105</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-06-29T18:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative with Multiplier</title>
      <link>https://community.qlik.com/t5/App-Development/Cumulative-with-Multiplier/m-p/1818686#M67106</link>
      <description>&lt;P&gt;that did not work. Seems to have just made it add the first 3 rows and nothing after.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically I just need the (cell total above * (1 + return)) + Annual contribution defined as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if((ValueLoop($(Age),$(RetAge),1) - $(Age))=0,$(CurrentBalance),&lt;/P&gt;&lt;P&gt;($(CurrentBalance) +&lt;/P&gt;&lt;P&gt;($(Salary)*&lt;BR /&gt;(pow(&lt;BR /&gt;(1+$(SalaryIncrease)),(ValueLoop($(Age),$(RetAge),1) - $(Age))&lt;BR /&gt;))*&lt;BR /&gt;$(Contribution)&lt;BR /&gt;)&lt;BR /&gt;))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The contribution part works just fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2021 18:56:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Cumulative-with-Multiplier/m-p/1818686#M67106</guid>
      <dc:creator>scottokeefe14</dc:creator>
      <dc:date>2021-06-29T18:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative with Multiplier</title>
      <link>https://community.qlik.com/t5/App-Development/Cumulative-with-Multiplier/m-p/1818709#M67113</link>
      <description>&lt;P&gt;added what I was working on as a QVF if anyone is willing to take a stab.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2021 21:07:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Cumulative-with-Multiplier/m-p/1818709#M67113</guid>
      <dc:creator>scottokeefe14</dc:creator>
      <dc:date>2021-06-29T21:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative with Multiplier</title>
      <link>https://community.qlik.com/t5/App-Development/Cumulative-with-Multiplier/m-p/1818805#M67124</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I also can't see a way of applying the growth to the prior periods correctly, either through accumulation or above/rangesum.&lt;/P&gt;&lt;P&gt;I have looked trying a UDF, that you pass row number raise and return, however I don't seem to be able to use either looping or recursion, therefore this is a bit of a brute force attempt.&lt;/P&gt;&lt;P&gt;I've done for 5 years, you would expand the range of years by adding in extra rows of formulae inbetween row 31/32, they are going to get long and messy (could potentially use Excel to write out the formulae &amp;amp; copy paste in), but I think this is &lt;EM&gt;possible&lt;/EM&gt; &amp;amp; your range of years should have a natural limt (?), but I don't know if Qlik will break before you get to that;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="20210630_2.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/57770i5463E526C3E4CD41/image-size/large?v=v2&amp;amp;px=999" role="button" title="20210630_2.png" alt="20210630_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I've also not looked at your current value and age sliders or how they are incorporated (or in fact used sliders at all), but I think that should be simpler, if this bit works, which (for my 5 year sample), looks like it might;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="20210630_1.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/57771iBD19C8196CC62700/image-size/large?v=v2&amp;amp;px=999" role="button" title="20210630_1.png" alt="20210630_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Attached the QVF, do post back if this works or if you find a more elegant solution.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chris.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 10:29:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Cumulative-with-Multiplier/m-p/1818805#M67124</guid>
      <dc:creator>chrismarlow</dc:creator>
      <dc:date>2021-06-30T10:29:01Z</dc:date>
    </item>
  </channel>
</rss>

