<?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: New Column calculation based on a defined date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/New-Column-calculation-based-on-a-defined-date/m-p/341862#M126264</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mayil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get all 0's for the Variable calculation you provided.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Kalyan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Jul 2012 18:24:41 GMT</pubDate>
    <dc:creator>nadkalyan</dc:creator>
    <dc:date>2012-07-09T18:24:41Z</dc:date>
    <item>
      <title>New Column calculation based on a defined date</title>
      <link>https://community.qlik.com/t5/QlikView/New-Column-calculation-based-on-a-defined-date/m-p/341858#M126260</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;We have a requirement where in we need to create a calculation based on amount for a particular date. Here is the table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" height="183" style="width: 429px; border: 1px solid rgb(0, 0, 0); height: 183px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;Amount&lt;BR /&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;As of Jan1 DIfference&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01/01/2012&lt;/TD&gt;&lt;TD style="text-align: right;"&gt;$1000&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01/08/2012&lt;/TD&gt;&lt;TD style="text-align: right;"&gt;$900&lt;/TD&gt;&lt;TD style="text-align: right;"&gt;-$100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01/15/2012&lt;/TD&gt;&lt;TD style="text-align: right;"&gt;$1500&lt;/TD&gt;&lt;TD style="text-align: right;"&gt;$500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01/29/2012&lt;/TD&gt;&lt;TD style="text-align: right;"&gt;$1800&lt;/TD&gt;&lt;TD style="text-align: right;"&gt;$800&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;02/05/2012&lt;/TD&gt;&lt;TD style="text-align: right;"&gt;$800&lt;/TD&gt;&lt;TD style="text-align: right;"&gt;-$200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;02/12/2012&lt;/TD&gt;&lt;TD style="text-align: right;"&gt;$1250&lt;/TD&gt;&lt;TD style="text-align: right;"&gt;$250&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;02/19/2012&lt;/TD&gt;&lt;TD style="text-align: right;"&gt;$1000&lt;/TD&gt;&lt;TD style="text-align: right;"&gt;&lt;P&gt;$0&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see the column I need is&lt;STRONG&gt; 'As of Jan1 Difference&lt;/STRONG&gt;' -&amp;nbsp; It is basically the difference of each row with Jan1, 2012 Amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone post any ideas on how to acheive this using expression calculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Kalyan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 17:18:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-Column-calculation-based-on-a-defined-date/m-p/341858#M126260</guid>
      <dc:creator>nadkalyan</dc:creator>
      <dc:date>2012-07-09T17:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: New Column calculation based on a defined date</title>
      <link>https://community.qlik.com/t5/QlikView/New-Column-calculation-based-on-a-defined-date/m-p/341859#M126261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can put the value (in this case $1000) in a variable, and then substact it from the daily values.&lt;/P&gt;&lt;P&gt;If you change the date reference, you can put it also in a variable, then you can play changing your reference date.&lt;/P&gt;&lt;P&gt;Hope this help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 17:34:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-Column-calculation-based-on-a-defined-date/m-p/341859#M126261</guid>
      <dc:creator />
      <dc:date>2012-07-09T17:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: New Column calculation based on a defined date</title>
      <link>https://community.qlik.com/t5/QlikView/New-Column-calculation-based-on-a-defined-date/m-p/341860#M126262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi dewaegep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your solution perfectly works if we have a unchanged Amount for Jan1 where i can put the contant amount as a variable and use this variable for calucluting the difference for each row. But if the Jan 1 Amount changes periodically, then is there a way to include logic to pick up amount for Jan 1 no matter what ever the changed amount is?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Kalyan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 17:39:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-Column-calculation-based-on-a-defined-date/m-p/341860#M126262</guid>
      <dc:creator>nadkalyan</dc:creator>
      <dc:date>2012-07-09T17:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: New Column calculation based on a defined date</title>
      <link>https://community.qlik.com/t5/QlikView/New-Column-calculation-based-on-a-defined-date/m-p/341861#M126263</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In a variable for example, vTest = Sum({&amp;lt;Date = {'01/01/2012'}&amp;gt;}Amount)&amp;nbsp; assign it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; And used in expression like =if(Date &amp;lt;&amp;gt; '01/01/2012', Amount - vTest, '')&amp;nbsp; or simply Amount - vTest as per your requirement..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; And Untick Suppress Zero Values in Presentation tab..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 18:08:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-Column-calculation-based-on-a-defined-date/m-p/341861#M126263</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-07-09T18:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: New Column calculation based on a defined date</title>
      <link>https://community.qlik.com/t5/QlikView/New-Column-calculation-based-on-a-defined-date/m-p/341862#M126264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mayil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get all 0's for the Variable calculation you provided.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Kalyan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 18:24:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-Column-calculation-based-on-a-defined-date/m-p/341862#M126264</guid>
      <dc:creator>nadkalyan</dc:creator>
      <dc:date>2012-07-09T18:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: New Column calculation based on a defined date</title>
      <link>https://community.qlik.com/t5/QlikView/New-Column-calculation-based-on-a-defined-date/m-p/341863#M126265</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Check the attached file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 18:30:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-Column-calculation-based-on-a-defined-date/m-p/341863#M126265</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-07-09T18:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: New Column calculation based on a defined date</title>
      <link>https://community.qlik.com/t5/QlikView/New-Column-calculation-based-on-a-defined-date/m-p/341864#M126266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kalyan,&lt;/P&gt;&lt;P&gt;the example of Mayil is what I was meaning. Depending on your script, you can load the amount of January in the variable during the data loading process. Just create the variable in the loading script.&lt;/P&gt;&lt;P&gt;Tell us if your satisfied with the Mayil solution. And put his response as the correct answer. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 22:06:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-Column-calculation-based-on-a-defined-date/m-p/341864#M126266</guid>
      <dc:creator />
      <dc:date>2012-07-09T22:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: New Column calculation based on a defined date</title>
      <link>https://community.qlik.com/t5/QlikView/New-Column-calculation-based-on-a-defined-date/m-p/341865#M126267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Mayil and dewaegap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The example provided by Mayil perfectly worked in our case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks both&lt;/P&gt;&lt;P&gt;Kalyan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2012 01:53:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-Column-calculation-based-on-a-defined-date/m-p/341865#M126267</guid>
      <dc:creator>nadkalyan</dc:creator>
      <dc:date>2012-07-10T01:53:39Z</dc:date>
    </item>
  </channel>
</rss>

