<?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: Calculated columns using previous values? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculated-columns-using-previous-values/m-p/1152820#M376480</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vidit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check the attached qvw for an example of how to calcuate values in script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- Karla&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Jun 2016 02:39:03 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-06-09T02:39:03Z</dc:date>
    <item>
      <title>Calculated columns using previous values?</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-columns-using-previous-values/m-p/1152819#M376479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i have an input table like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="360"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="98"&gt;Date&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="98"&gt;Category&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="36"&gt;Count&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="64"&gt;Offset&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="64"&gt;Total&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;Q4 2015&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;D&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;9&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;Q1 2016&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;9&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;Q1 2016&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;Q1 2016&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;C&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;8&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;Q1 2016&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;D&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;Q2 2016&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;Q2 2016&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;Q2 2016&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;C&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;Q2 2016&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;D&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need to calculate the columns Offset and total. the logic for which are as follows&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 382px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="17" width="212"&gt;Total (calculated each quarter)&lt;/TD&gt;&lt;TD width="170"&gt;Value D of previous Qtr&amp;nbsp; + value A of current \Qtr&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD colspan="2" height="17"&gt;Column Offset (for each category each quarter)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17"&gt;offset of A&lt;/TD&gt;&lt;TD&gt;Total- A for current Qtr&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;Offset of B&lt;/TD&gt;&lt;TD class="xl65"&gt;Total -&amp;nbsp; B For Current Quarter&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;Offset of C&lt;/TD&gt;&lt;TD class="xl65"&gt;Total -&amp;nbsp; B - C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;Offset of D&lt;/TD&gt;&lt;TD&gt;Always 0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to create a dynamic logic for this, as data for more years may come.&lt;/P&gt;&lt;P&gt;They can be calculated in script or via expressions.&lt;/P&gt;&lt;P&gt;Please suggest. thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vidit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2016 15:07:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-columns-using-previous-values/m-p/1152819#M376479</guid>
      <dc:creator>Vidit</dc:creator>
      <dc:date>2016-06-08T15:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated columns using previous values?</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-columns-using-previous-values/m-p/1152820#M376480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vidit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check the attached qvw for an example of how to calcuate values in script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- Karla&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2016 02:39:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-columns-using-previous-values/m-p/1152820#M376480</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-09T02:39:03Z</dc:date>
    </item>
  </channel>
</rss>

