<?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: Calculate pivot table result based in previous value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculate-pivot-table-result-based-in-previous-value/m-p/1910468#M1218100</link>
    <description>&lt;P&gt;Anybody?&lt;/P&gt;
&lt;P&gt;I am sure this cannot be so hard, but I am really struggling.&lt;/P&gt;
&lt;P&gt;Thanks a lot in advance.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Mar 2022 09:35:54 GMT</pubDate>
    <dc:creator>Fernando_Sanchez</dc:creator>
    <dc:date>2022-03-28T09:35:54Z</dc:date>
    <item>
      <title>Calculate pivot table result based in previous value</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-pivot-table-result-based-in-previous-value/m-p/1909087#M1218029</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;firt of all thanks a lot in advance for any future answer.&lt;/P&gt;
&lt;P&gt;I am struggling quite a lo with obtaining a result within a pivot table based in previous value.&lt;/P&gt;
&lt;P&gt;For example, I have this table:&lt;/P&gt;
&lt;P&gt;Every month I have a certain decrease of a figure.&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 120pt;" border="0" width="160" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD width="80" height="19" class="xl65" style="height: 14.5pt; width: 60pt;"&gt;month&lt;/TD&gt;
&lt;TD width="80" class="xl65" style="border-left: none; width: 60pt;"&gt;pct&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl66" style="height: 14.5pt; border-top: none;"&gt;m01&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;1%&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl66" style="height: 14.5pt; border-top: none;"&gt;m02&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;2%&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl66" style="height: 14.5pt; border-top: none;"&gt;m03&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;3%&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl66" style="height: 14.5pt; border-top: none;"&gt;m04&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;4%&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl66" style="height: 14.5pt; border-top: none;"&gt;m05&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;5%&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl66" style="height: 14.5pt; border-top: none;"&gt;m06&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;6%&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl66" style="height: 14.5pt; border-top: none;"&gt;m07&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;7%&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl66" style="height: 14.5pt; border-top: none;"&gt;m08&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;8%&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl66" style="height: 14.5pt; border-top: none;"&gt;m09&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;9%&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl66" style="height: 14.5pt; border-top: none;"&gt;m10&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;10%&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl66" style="height: 14.5pt; border-top: none;"&gt;m11&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;11%&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl66" style="height: 14.5pt; border-top: none;"&gt;m12&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;12%&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;And what I am looking for is to obtain this output:&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 180pt;" border="0" width="240" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD width="80" height="19" class="xl65" style="height: 14.5pt; width: 60pt;"&gt;month&lt;/TD&gt;
&lt;TD width="80" class="xl65" style="border-left: none; width: 60pt;"&gt;pct&lt;/TD&gt;
&lt;TD width="80" class="xl69" style="border-left: none; width: 60pt;"&gt;output&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl66" style="height: 14.5pt; border-top: none;"&gt;m01&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;1%&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;99,00%&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl66" style="height: 14.5pt; border-top: none;"&gt;m02&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;2%&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;97,02%&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl66" style="height: 14.5pt; border-top: none;"&gt;m03&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;3%&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;94,11%&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl66" style="height: 14.5pt; border-top: none;"&gt;m04&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;4%&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;90,35%&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl66" style="height: 14.5pt; border-top: none;"&gt;m05&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;5%&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;85,83%&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl66" style="height: 14.5pt; border-top: none;"&gt;m06&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;6%&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;80,68%&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl66" style="height: 14.5pt; border-top: none;"&gt;m07&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;7%&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;75,03%&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl66" style="height: 14.5pt; border-top: none;"&gt;m08&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;8%&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;69,03%&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl66" style="height: 14.5pt; border-top: none;"&gt;m09&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;9%&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;62,82%&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl66" style="height: 14.5pt; border-top: none;"&gt;m10&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;10%&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;56,53%&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl66" style="height: 14.5pt; border-top: none;"&gt;m11&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;11%&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;50,32%&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl66" style="height: 14.5pt; border-top: none;"&gt;m12&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;12%&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;44,28%&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where output is the rest of the inventory (in pct) available.&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;m01 value is 100% decreased by 1% --&amp;gt; 1* (1-0,01) --&amp;gt; 99.&lt;/P&gt;
&lt;P&gt;m02 value is 99% decreased by 2% --&amp;gt; 0,99 * (1-0,02) --&amp;gt; 97,02.&lt;/P&gt;
&lt;P&gt;m03 value is 97,02% decreased by 3% --&amp;gt; 0,9702* (1-0,03) --&amp;gt; 94,11.&lt;/P&gt;
&lt;P&gt;And so on.&lt;/P&gt;
&lt;P&gt;I have been playing with above, before and others, but i am not capable of finding the answer.&lt;/P&gt;
&lt;P&gt;Thanlk a lot in advance!&lt;/P&gt;
&lt;P&gt;Regards.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 01:25:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-pivot-table-result-based-in-previous-value/m-p/1909087#M1218029</guid>
      <dc:creator>Fernando_Sanchez</dc:creator>
      <dc:date>2022-03-24T01:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate pivot table result based in previous value</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-pivot-table-result-based-in-previous-value/m-p/1910468#M1218100</link>
      <description>&lt;P&gt;Anybody?&lt;/P&gt;
&lt;P&gt;I am sure this cannot be so hard, but I am really struggling.&lt;/P&gt;
&lt;P&gt;Thanks a lot in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 09:35:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-pivot-table-result-based-in-previous-value/m-p/1910468#M1218100</guid>
      <dc:creator>Fernando_Sanchez</dc:creator>
      <dc:date>2022-03-28T09:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate pivot table result based in previous value</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-pivot-table-result-based-in-previous-value/m-p/1912705#M1218241</link>
      <description>&lt;P&gt;ok, I finally come up with the solution&lt;/P&gt;
&lt;P&gt;The value for the second colum is&lt;/P&gt;
&lt;P&gt;=if(month='m+00',1-pct,Alt(Above(output),0)-(pct*Alt(Above(output),0)))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now. Once I have the value calculated, I want to put into a text box the first value to be above 50%.&lt;/P&gt;
&lt;P&gt;But I am struggling to do so, as I do not have any clue about how "to extract" it from its pivot table.&lt;/P&gt;
&lt;P&gt;Thanks a lot in advance.&lt;/P&gt;
&lt;P&gt;Regards!&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 18:17:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-pivot-table-result-based-in-previous-value/m-p/1912705#M1218241</guid>
      <dc:creator>Fernando_Sanchez</dc:creator>
      <dc:date>2022-03-31T18:17:44Z</dc:date>
    </item>
  </channel>
</rss>

