<?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: Last Week's Data in Expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Last-Week-s-Data-in-Expression/m-p/771989#M273938</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would use the InWeek() function. The function provides a shift parameter that indicates the week offset. Here's an example using different data but you'll get the idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;// This week&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;=sum({&amp;lt;OrderDate={"=inweek(OrderDate,today(1),&lt;STRONG&gt;0&lt;/STRONG&gt;)"}&amp;gt;}LineSalesAmount)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;// Last&amp;nbsp; week&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;=sum({&amp;lt;OrderDate={"=inweek(OrderDate,today(1),&lt;STRONG&gt;-1&lt;/STRONG&gt;)"}&amp;gt;}LineSalesAmount)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com/" rel="nofollow"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://robwunderlich.com/" rel="nofollow"&gt;http://robwunderlich.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Feb 2015 16:47:52 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2015-02-09T16:47:52Z</dc:date>
    <item>
      <title>Last Week's Data in Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Last-Week-s-Data-in-Expression/m-p/771987#M273936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;How do I change this expression to show me the previous week instead of the current week? For example, today is Monday February 9th and this expression is showing me data from this week. I want it to instead show me last week (Feb 2nd week).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Date Changed]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'&amp;gt;=$(=WeekStart( Today())) &amp;lt;=$(=Date(WeekEnd( Today())-2))'} &amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Type of Change]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 16:24:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-Week-s-Data-in-Expression/m-p/771987#M273936</guid>
      <dc:creator />
      <dc:date>2015-02-09T16:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: Last Week's Data in Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Last-Week-s-Data-in-Expression/m-p/771988#M273937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lindsay, the easy way can be substract 7 from Today():&lt;/P&gt;&lt;P&gt;Count&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Date Changed]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'&amp;gt;=$(=WeekStart( Today()&lt;STRONG&gt;-7&lt;/STRONG&gt;)) &amp;lt;=$(=Date(WeekEnd( Today()&lt;STRONG&gt;-7&lt;/STRONG&gt;)-2))'} &amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Type of Change]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 16:35:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-Week-s-Data-in-Expression/m-p/771988#M273937</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-02-09T16:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: Last Week's Data in Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Last-Week-s-Data-in-Expression/m-p/771989#M273938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would use the InWeek() function. The function provides a shift parameter that indicates the week offset. Here's an example using different data but you'll get the idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;// This week&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;=sum({&amp;lt;OrderDate={"=inweek(OrderDate,today(1),&lt;STRONG&gt;0&lt;/STRONG&gt;)"}&amp;gt;}LineSalesAmount)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;// Last&amp;nbsp; week&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;=sum({&amp;lt;OrderDate={"=inweek(OrderDate,today(1),&lt;STRONG&gt;-1&lt;/STRONG&gt;)"}&amp;gt;}LineSalesAmount)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com/" rel="nofollow"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://robwunderlich.com/" rel="nofollow"&gt;http://robwunderlich.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 16:47:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-Week-s-Data-in-Expression/m-p/771989#M273938</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2015-02-09T16:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: Last Week's Data in Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Last-Week-s-Data-in-Expression/m-p/771990#M273939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This worked, thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 19:14:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-Week-s-Data-in-Expression/m-p/771990#M273939</guid>
      <dc:creator />
      <dc:date>2015-02-09T19:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: Last Week's Data in Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Last-Week-s-Data-in-Expression/m-p/771991#M273940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need help on getting last week's data based on Weekstart and Weekend, as my week starting from Friday and Week ending on Thursday so I want to see the data of last week's based on week.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with your expression (inweek), but it is taking from Monday to Sunday (weekstart and weekend), how to change the weekstart and weekend in script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls help. thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find the attached screenshot for the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2016 12:04:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-Week-s-Data-in-Expression/m-p/771991#M273940</guid>
      <dc:creator />
      <dc:date>2016-02-03T12:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: Last Week's Data in Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Last-Week-s-Data-in-Expression/m-p/771992#M273941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The InWeek() function takes a 3rd parm that sets the week start day. Take a look at the Help for InWeek().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com" rel="nofollow"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://qlikviewcookbook.com" rel="nofollow"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Feb 2016 18:30:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-Week-s-Data-in-Expression/m-p/771992#M273941</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2016-02-07T18:30:16Z</dc:date>
    </item>
  </channel>
</rss>

