<?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: Prior week- Date problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Prior-week-Date-problem/m-p/461155#M172160</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi J,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already started a new thread&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/message/305022#305022" title="http://community.qlik.com/message/305022#305022"&gt;http://community.qlik.com/message/305022#305022&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thot that may be you know this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if You know it please reply in new thread&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Jan 2013 09:53:46 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-01-29T09:53:46Z</dc:date>
    <item>
      <title>Prior week- Date problem</title>
      <link>https://community.qlik.com/t5/QlikView/Prior-week-Date-problem/m-p/461149#M172154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Geniuses,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem related with Prior week &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 247px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="24" width="155"&gt;Last Refresh Date&lt;/TD&gt;&lt;TD class="xl65" width="92"&gt;Weekday&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl67" height="24"&gt;12/10/2012&lt;/TD&gt;&lt;TD class="xl66"&gt;Monday&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl67" height="24"&gt;12/14/2012&lt;/TD&gt;&lt;TD class="xl66"&gt;Friday&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl67" height="24"&gt;12/15/2012&lt;/TD&gt;&lt;TD class="xl66"&gt;Saturday&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl67" height="24"&gt;12/20/2012&lt;/TD&gt;&lt;TD class="xl66"&gt;Thursday&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl67" height="24"&gt;1/11/2013&lt;/TD&gt;&lt;TD class="xl66"&gt;Friday&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl67" height="24"&gt;1/12/2013&lt;/TD&gt;&lt;TD class="xl66"&gt;Saturday&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="24"&gt;1/14/2013&lt;/TD&gt;&lt;TD class="xl69"&gt;Monday&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl67" height="24"&gt;1/18/2013&lt;/TD&gt;&lt;TD class="xl66"&gt;Friday&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl67" height="24"&gt;1/19/2013&lt;/TD&gt;&lt;TD class="xl66"&gt;Saturday&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl67" height="24"&gt;1/20/2013&lt;/TD&gt;&lt;TD class="xl66"&gt;Sunday&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lets say I am on sunday 1/20/2013 so I need to go to the last monday which is said to be mine prior week, it's easy for me to do so what I am doing is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(weekday($(vRefreshDate))='Sun',date($(vRefreshDate)-6,'MM/DD/YYYY')) where vRefreshDate is the latest refresh date and storing alll this in a variable and then use it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But here comes the tricy part lets say my last refresh date is 1/12/2013 so ideally prior week should be 1/7/2013 which is monday but that date is not available so now what I want is that if that date is not available then my variable will pick the last refresh date before that monday which is 12/20/2012&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please lemme konw if u need any clarifications&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shashank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 06:34:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Prior-week-Date-problem/m-p/461149#M172154</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-01-28T06:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Prior week- Date problem</title>
      <link>https://community.qlik.com/t5/QlikView/Prior-week-Date-problem/m-p/461150#M172155</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;Something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(weekday(vRefreshDate)='Sun',max({&amp;lt;[Last Refresh Date] = {"&amp;lt;=$(=date(vRefreshDate-6,'MM/DD/YYYY'))"}&amp;gt;} [Last Refresh Date]), vRefreshDate)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming [Last Refresh Date] is the name of the field and that it is in MM/DD/YYYY format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 06:54:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Prior-week-Date-problem/m-p/461150#M172155</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2013-01-28T06:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Prior week- Date problem</title>
      <link>https://community.qlik.com/t5/QlikView/Prior-week-Date-problem/m-p/461151#M172156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tink its working fine, Please could u explain how its doing this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 07:41:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Prior-week-Date-problem/m-p/461151#M172156</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-01-28T07:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Prior week- Date problem</title>
      <link>https://community.qlik.com/t5/QlikView/Prior-week-Date-problem/m-p/461152#M172157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please tell me how can I implement this set in the script and store its value into the variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 08:04:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Prior-week-Date-problem/m-p/461152#M172157</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-01-29T08:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: Prior week- Date problem</title>
      <link>https://community.qlik.com/t5/QlikView/Prior-week-Date-problem/m-p/461153#M172158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In psuedo-code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the weekday is a Sunday,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Take the most recent (Max) value of Last Refresh Date that is before or on (&amp;lt;=) 6 days before vRefreshDate (vRefreshDate-6) and return that date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return vRefreshDate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 09:09:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Prior-week-Date-problem/m-p/461153#M172158</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2013-01-29T09:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: Prior week- Date problem</title>
      <link>https://community.qlik.com/t5/QlikView/Prior-week-Date-problem/m-p/461154#M172159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suggest that you start another thread as this is a new topic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 09:10:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Prior-week-Date-problem/m-p/461154#M172159</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2013-01-29T09:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: Prior week- Date problem</title>
      <link>https://community.qlik.com/t5/QlikView/Prior-week-Date-problem/m-p/461155#M172160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi J,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already started a new thread&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/message/305022#305022" title="http://community.qlik.com/message/305022#305022"&gt;http://community.qlik.com/message/305022#305022&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thot that may be you know this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if You know it please reply in new thread&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 09:53:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Prior-week-Date-problem/m-p/461155#M172160</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-01-29T09:53:46Z</dc:date>
    </item>
  </channel>
</rss>

