<?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: calculating factors in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/calculating-factors-in-script/m-p/1378847#M797626</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;perfect, thank you for this &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is how i did it in my script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample:&lt;/P&gt;&lt;P&gt;Load Distinct&lt;/P&gt;&lt;P&gt;Product_ID,&lt;/P&gt;&lt;P&gt;Year,&lt;/P&gt;&lt;P&gt;Demand_Value,&lt;/P&gt;&lt;P&gt;Cost&lt;/P&gt;&lt;P&gt;FROM Table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left Join(Sample)&lt;/P&gt;&lt;P&gt;Load Distinct&lt;/P&gt;&lt;P&gt;Product_ID,&lt;/P&gt;&lt;P&gt;Min(Year) as MinYear&lt;/P&gt;&lt;P&gt;Resident Sample&lt;/P&gt;&lt;P&gt;Group by Product_ID;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FINAL:&lt;/P&gt;&lt;P&gt;Load Distinct *,&lt;/P&gt;&lt;P&gt;if(Product_ID=Previous(Product_ID), 1/pow(1.09,(Year - MinYear))) as FACTOR&lt;/P&gt;&lt;P&gt;Resident Sample&lt;/P&gt;&lt;P&gt;Order By Product_ID;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Dec 2017 14:28:49 GMT</pubDate>
    <dc:creator>supriyabiware</dc:creator>
    <dc:date>2017-12-11T14:28:49Z</dc:date>
    <item>
      <title>calculating factors in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-factors-in-script/m-p/1378835#M797614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement is to calculate a column in Script which is as below-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;Final Demand Value for Product&lt;/STRONG&gt;= Demand Value * Cost * Factor -&amp;gt; (i have demand value and cost already present in table)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;whereas my factor is another calculation &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Factor (For first Year) = 1&lt;/P&gt;&lt;P&gt;Factor (For 2nd Year) = 1/1.09&lt;/P&gt;&lt;P&gt;Factor (For 3rd Year) = Factor (For 2nd Year)/1.09&lt;/P&gt;&lt;P&gt;Factor (For 4th Year) = Factor (For 3rd Year)/1.09&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;So on untill the Demand years for one product&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i calculate the factor column in my script ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Supriya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-factors-in-script/m-p/1378835#M797614</guid>
      <dc:creator>supriyabiware</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: calculating factors in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-factors-in-script/m-p/1378836#M797615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the formulae for Factor ??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2017 09:36:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-factors-in-script/m-p/1378836#M797615</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-12-11T09:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: calculating factors in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-factors-in-script/m-p/1378837#M797616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;These are constants depending on demand years for one product&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Factor (For first Year) = 1&lt;/P&gt;&lt;P&gt;Factor (For 2nd Year) = 1/1.09&lt;/P&gt;&lt;P&gt;Factor (For 3rd Year) = Factor (For 2nd Year)/1.09&lt;/P&gt;&lt;P&gt;Factor (For 4th Year) = Factor (For 3rd Year)/1.09&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;So on untill the Demand years for one product&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2017 09:39:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-factors-in-script/m-p/1378837#M797616</guid>
      <dc:creator>supriyabiware</dc:creator>
      <dc:date>2017-12-11T09:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: calculating factors in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-factors-in-script/m-p/1378838#M797617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not really sure, your expression about? You haven't indicate anything. For a while perhaps this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sample:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load [Demand Value], Cost, Year From table;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Final:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load 'This year' as Flag,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Factor Formulae" as Factor&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Sample Where Year = 2017;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Concatenate(Final)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load 'This year' as Flag,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Factor Formulae"/2017 as Factor&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Sample Where Year = 2016;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Concatenate(Final)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load 'This year' as Flag,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Factor Formulae"/2016 as Factor&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Sample Where Year = 2015;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Legend:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NoConcatenate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load [Demand Value], Cost, Sum(Flag) as Factor_Sum Resident Final Group By [Demand Value], Cost;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2017 09:47:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-factors-in-script/m-p/1378838#M797617</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-12-11T09:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: calculating factors in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-factors-in-script/m-p/1378839#M797618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps the concatenation wouldnt possible since my sample Data table is 25 million rows. (i am not sure though)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also for every product i have various number for years depending on demand contract(eg - one product has been signed for next 10 years, another for 2 years, etc)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sample:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Demand Value],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; Cost,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; Year&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; From table;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Final table be something like&lt;/P&gt;&lt;P&gt;Final:&lt;/P&gt;&lt;P&gt;Left Keep(Sample)&lt;/P&gt;&lt;P&gt;Year,&lt;/P&gt;&lt;P&gt;If (Year= min Year, 1 , Previous('Factor')/1.09 ) as Factor&lt;/P&gt;&lt;P&gt;resident Sample&lt;/P&gt;&lt;P&gt;Group by Year;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the factor formula doesnt seem quite working. it should be running calculation on itself &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Supriya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2017 10:13:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-factors-in-script/m-p/1378839#M797618</guid>
      <dc:creator>supriyabiware</dc:creator>
      <dc:date>2017-12-11T10:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: calculating factors in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-factors-in-script/m-p/1378840#M797619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe i missed one thing, My Sample Data be like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sample:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;ProductID,&lt;/SPAN&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Demand Value],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cost,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Year&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;From table;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2017 10:19:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-factors-in-script/m-p/1378840#M797619</guid>
      <dc:creator>supriyabiware</dc:creator>
      <dc:date>2017-12-11T10:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: calculating factors in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-factors-in-script/m-p/1378841#M797620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this?&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;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Sample:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Load &lt;/STRONG&gt;&lt;STRONG style="font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;ProductID, &lt;/STRONG&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;[Demand Value], &lt;/STRONG&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Cost, &lt;/STRONG&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Year &lt;/STRONG&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;From table;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;LET vMinYear = Min(Year);&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Final:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Left Keep (Sample)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Year,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;If (Year= $(vMinYear), 1 , Previous('Factor')/1.09 ) as Factor&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;resident Sample&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Group by Year;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2017 11:31:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-factors-in-script/m-p/1378841#M797620</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-12-11T11:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: calculating factors in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-factors-in-script/m-p/1378842#M797621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Anil, but i think Previous(Factor) isnt working here since it is not getting any value. Even Same with PEEK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it was just an assumption for solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also minimum year for every product would be different&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2017 11:45:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-factors-in-script/m-p/1378842#M797621</guid>
      <dc:creator>supriyabiware</dc:creator>
      <dc:date>2017-12-11T11:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: calculating factors in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-factors-in-script/m-p/1378843#M797622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In fact, Not sure how Factor is calculating? Will you attach sample data to investigate&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2017 11:46:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-factors-in-script/m-p/1378843#M797622</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-12-11T11:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: calculating factors in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-factors-in-script/m-p/1378844#M797623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i just need to calculate Factor column as shown in expected result&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2017 12:13:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-factors-in-script/m-p/1378844#M797623</guid>
      <dc:creator>supriyabiware</dc:creator>
      <dc:date>2017-12-11T12:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: calculating factors in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-factors-in-script/m-p/1378845#M797624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="statement" style="font-weight: bold; color: #0f0f0f; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 16px;"&gt;1/pow(&lt;SPAN style="font-size: 13.3333px;"&gt;(1+0.9)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="user_input" style="color: #0f0f0f; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 16px;"&gt;,&lt;SPAN style="color: #ff0000;"&gt;year&lt;/SPAN&gt;-1&lt;/SPAN&gt;&lt;SPAN class="statement" style="font-weight: bold; color: #0f0f0f; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 16px;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="statement" style="font-weight: bold; color: #0f0f0f; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 16px;"&gt;ex:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="statement" style="font-weight: bold; color: #0f0f0f; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 16px;"&gt;1st year-&amp;gt; 1/pow((1+0.9),&lt;SPAN style="color: #ff0000;"&gt;1&lt;/SPAN&gt;-1)-&amp;gt;1/pow((1+0.9),0)-&amp;gt;1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="statement" style="font-weight: bold; color: #0f0f0f; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 16px;"&gt;2nd year&lt;SPAN style="color: #0f0f0f; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 16px; font-weight: bold;"&gt;-&amp;gt; 1/pow((1+0.9),&lt;SPAN style="color: #ff0000;"&gt;2&lt;/SPAN&gt;-1)-&amp;gt;1/pow((1+0.9),1)-&amp;gt;1/1.09&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0f0f0f; font-size: 16px; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-weight: bold;"&gt;&lt;SPAN style="color: #0f0f0f; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 16px; font-weight: bold;"&gt;3rd year&lt;/SPAN&gt;&lt;SPAN style="color: #0f0f0f; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 16px; font-weight: bold;"&gt;-&amp;gt; 1/pow((1+0.9),&lt;SPAN style="color: #ff0000;"&gt;3&lt;/SPAN&gt;-1)-&amp;gt;1/pow((1+0.9),2)-&amp;gt;1/1.09/1.09&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0f0f0f; font-size: 16px; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-weight: bold;"&gt;..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0f0f0f; font-size: 16px; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-weight: bold;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0f0f0f; font-size: 16px; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-weight: bold;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0f0f0f; font-size: 16px; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-weight: bold;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0f0f0f; font-size: 16px; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-weight: bold;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0f0f0f; font-size: 16px; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-weight: bold;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0f0f0f; font-size: 16px; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-weight: bold;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0f0f0f; font-size: 16px; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-weight: bold;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="statement" style="font-weight: bold; color: #0f0f0f; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 16px;"&gt;&lt;SPAN style="color: #0f0f0f; font-size: 16px; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-weight: bold;"&gt;10th year-&amp;gt;&lt;SPAN style="color: #0f0f0f; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 16px; font-weight: bold;"&gt;1/pow((1+0.9),&lt;/SPAN&gt;&lt;SPAN style="font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 16px; font-weight: bold; color: #ff0000;"&gt;10&lt;/SPAN&gt;&lt;SPAN style="color: #0f0f0f; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 16px; font-weight: bold;"&gt;-1)-&amp;gt;1/pow((1+0.9),9)-&amp;gt;1/1.09/1.09....&lt;SPAN style="color: #0f0f0f; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 16px; font-weight: bold;"&gt;/1.09&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2017 12:55:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-factors-in-script/m-p/1378845#M797624</guid>
      <dc:creator>cweiping</dc:creator>
      <dc:date>2017-12-11T12:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: calculating factors in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-factors-in-script/m-p/1378846#M797625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;does this fill Your requirement?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2017 13:42:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-factors-in-script/m-p/1378846#M797625</guid>
      <dc:creator>stabben23</dc:creator>
      <dc:date>2017-12-11T13:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: calculating factors in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-factors-in-script/m-p/1378847#M797626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;perfect, thank you for this &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is how i did it in my script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample:&lt;/P&gt;&lt;P&gt;Load Distinct&lt;/P&gt;&lt;P&gt;Product_ID,&lt;/P&gt;&lt;P&gt;Year,&lt;/P&gt;&lt;P&gt;Demand_Value,&lt;/P&gt;&lt;P&gt;Cost&lt;/P&gt;&lt;P&gt;FROM Table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left Join(Sample)&lt;/P&gt;&lt;P&gt;Load Distinct&lt;/P&gt;&lt;P&gt;Product_ID,&lt;/P&gt;&lt;P&gt;Min(Year) as MinYear&lt;/P&gt;&lt;P&gt;Resident Sample&lt;/P&gt;&lt;P&gt;Group by Product_ID;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FINAL:&lt;/P&gt;&lt;P&gt;Load Distinct *,&lt;/P&gt;&lt;P&gt;if(Product_ID=Previous(Product_ID), 1/pow(1.09,(Year - MinYear))) as FACTOR&lt;/P&gt;&lt;P&gt;Resident Sample&lt;/P&gt;&lt;P&gt;Order By Product_ID;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2017 14:28:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-factors-in-script/m-p/1378847#M797626</guid>
      <dc:creator>supriyabiware</dc:creator>
      <dc:date>2017-12-11T14:28:49Z</dc:date>
    </item>
  </channel>
</rss>

