<?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 Current Minus Previous Loaded Date Balance in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Current-Minus-Previous-Loaded-Date-Balance/m-p/831249#M1015596</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way that I can create a variable to calculate the current balance for the previous loaded date? I have data for accounts for all business days and I what I want to do is calculate current balance - previous balance to get the variance. I created a variable to give me the max date and created one for the previous date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vMaxDate = Max(Date) - for current balance&lt;/P&gt;&lt;P&gt;vPrvDate = Date(Max(Date) - 1) - for previous balance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I am getting is for example on a Monday, the vPrvDate is giving me the day of Sunday and since I only have data for business days, the value that is giving me is 0. What I need for the vPrvDate variable is to yield the last date of loaded data, for example on friday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid; WIDTH: 100%; BORDER-TOP: #000000 1px solid; BORDER-RIGHT: #000000 1px solid;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Account&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Balance&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;XXXX1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;50000&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;04/09/15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;XXXX1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;100000&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;04/10/15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;XXXX1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;150000&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;04/13/15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;XXXX1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;50000&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;04/15/15&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I need is that when I select Date 04/13/15:&lt;/P&gt;&lt;P&gt;It provides me with the Current Balance of $150,000 and previous balance of $100,000. Causing a positive difference of $50,000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currenly with the vPrvDate as I have it, when I select Date 04/13/15&lt;/P&gt;&lt;P&gt;It provides me with the Current Balance of $150,000, previous balance of $0 from 04/12/15 (since I dont have data for that date) and a difference of $0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know who I can fix this. Thank you. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Apr 2015 14:49:19 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-04-14T14:49:19Z</dc:date>
    <item>
      <title>Current Minus Previous Loaded Date Balance</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Minus-Previous-Loaded-Date-Balance/m-p/831249#M1015596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way that I can create a variable to calculate the current balance for the previous loaded date? I have data for accounts for all business days and I what I want to do is calculate current balance - previous balance to get the variance. I created a variable to give me the max date and created one for the previous date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vMaxDate = Max(Date) - for current balance&lt;/P&gt;&lt;P&gt;vPrvDate = Date(Max(Date) - 1) - for previous balance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I am getting is for example on a Monday, the vPrvDate is giving me the day of Sunday and since I only have data for business days, the value that is giving me is 0. What I need for the vPrvDate variable is to yield the last date of loaded data, for example on friday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid; WIDTH: 100%; BORDER-TOP: #000000 1px solid; BORDER-RIGHT: #000000 1px solid;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Account&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Balance&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;XXXX1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;50000&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;04/09/15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;XXXX1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;100000&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;04/10/15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;XXXX1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;150000&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;04/13/15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;XXXX1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;50000&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;04/15/15&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I need is that when I select Date 04/13/15:&lt;/P&gt;&lt;P&gt;It provides me with the Current Balance of $150,000 and previous balance of $100,000. Causing a positive difference of $50,000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currenly with the vPrvDate as I have it, when I select Date 04/13/15&lt;/P&gt;&lt;P&gt;It provides me with the Current Balance of $150,000, previous balance of $0 from 04/12/15 (since I dont have data for that date) and a difference of $0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know who I can fix this. Thank you. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 14:49:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Minus-Previous-Loaded-Date-Balance/m-p/831249#M1015596</guid>
      <dc:creator />
      <dc:date>2015-04-14T14:49:19Z</dc:date>
    </item>
  </channel>
</rss>

