<?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: Current week Vs Last Year current week data, Depending on reload date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Current-week-Vs-Last-Year-current-week-data-Depending-on-reload/m-p/1539069#M439328</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am getting number of examples in our community related to display Last year's same week data, but unable to find the one for my scenario.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Someone please advise how can I achieve my scenario.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nihal&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Feb 2019 12:54:15 GMT</pubDate>
    <dc:creator>nihalbuddy09</dc:creator>
    <dc:date>2019-02-04T12:54:15Z</dc:date>
    <item>
      <title>Current week Vs Last Year current week data, Depending on reload date</title>
      <link>https://community.qlik.com/t5/QlikView/Current-week-Vs-Last-Year-current-week-data-Depending-on-reload/m-p/1538426#M439288</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;We have a pivot table where we are displaying the data for current week and last year same week. Below are the two expressions we are using it on the report currently.&lt;/P&gt;&lt;P&gt;1. For current week data:&lt;BR /&gt;=Sum({&amp;lt;CalendarDate={'&amp;gt;=$(vWeekStart)&amp;lt;=$(vWeekEnd)'}&amp;gt;}(UnitVolume))&lt;BR /&gt;by this expression we are displaying the data for the current week, for example week started on Monday 28 Jan'19 and if we run the report&amp;nbsp; on 31st Jan , we will get the data for 28, 29 and 30th.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. For Last year same week data:&lt;BR /&gt;=Sum({&amp;lt;CalendarDate={'&amp;gt;=$(vLYWeekStart)&amp;lt;=$(vLYWeekEnd)'}&amp;gt;}(UnitVolume))&lt;/P&gt;&lt;P&gt;by this expression we are showing the data for last year same week i.e, from 29/01/2018 to 04/02/2018 (total 7 days of data is displaying). But, we got the change in requirement and here when we ran the report on the 31st Jan'19 we should get the data for 3 days only&amp;nbsp; i.e for 29, 30 and 31st (like we got for the current year- current week data) instead of displaying the 7 days data. Later next day when we will run the report, it should display 4 days of data...&lt;/P&gt;&lt;P&gt;Please help me on this so that I can correct the last year set analysis expression.&lt;/P&gt;&lt;P&gt;I am searching here in our community was unable to find the thread which relate to my scenario, hope I explained it correctly, please advise.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nihal&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:34:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-week-Vs-Last-Year-current-week-data-Depending-on-reload/m-p/1538426#M439288</guid>
      <dc:creator>nihalbuddy09</dc:creator>
      <dc:date>2024-11-16T04:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Current week Vs Last Year current week data, Depending on reload date</title>
      <link>https://community.qlik.com/t5/QlikView/Current-week-Vs-Last-Year-current-week-data-Depending-on-reload/m-p/1538659#M439305</link>
      <description>&lt;P&gt;Hi Nihal,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It does make sense. You just have to take your current variables that have data range for current year, and put last year's year.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;like:&lt;/P&gt;&lt;P&gt;vLYWeekStart:&lt;/P&gt;&lt;P&gt;makedate(year(&lt;SPAN&gt;$(vWeekStart)-1&lt;/SPAN&gt;),month(&lt;SPAN&gt;$(vWeekStart)&lt;/SPAN&gt;),day(&lt;SPAN&gt;$(vWeekStart)&lt;/SPAN&gt;))&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;same for the other variable.&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Carlos M&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2019 22:21:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-week-Vs-Last-Year-current-week-data-Depending-on-reload/m-p/1538659#M439305</guid>
      <dc:creator>CarlosAMonroy</dc:creator>
      <dc:date>2019-02-01T22:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Current week Vs Last Year current week data, Depending on reload date</title>
      <link>https://community.qlik.com/t5/QlikView/Current-week-Vs-Last-Year-current-week-data-Depending-on-reload/m-p/1538697#M439308</link>
      <description>&lt;P&gt;Hi Carlos,&lt;/P&gt;&lt;P&gt;Thank you for your response and these are the variables which we are using it currently to display the data.&lt;/P&gt;&lt;P&gt;Let vDateofExtractOffset=0;&lt;BR /&gt;Let vDateofExtract=date(Today()-$(vDateofExtractOffset));&lt;BR /&gt;Let vWeekStart = WeekStart('$(vDateofExtract)',0,0);&lt;BR /&gt;Let vWeekEnd = WeekEnd('$(vDateofExtract)',0,0);&lt;BR /&gt;Let vYearStart = '01/03/2018';&lt;BR /&gt;Let vLYWeekStart = WeekStart('$(vDateofExtract)',-52,0);&lt;BR /&gt;Let vLYWeekEnd = WeekEnd('$(vDateofExtract)',-52,0);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;As it looks like your suggested approach of creating a variable for Last year is also same as what we are using it currently.&lt;BR /&gt;Still I am getting the 7 days of data for last year same week, instead of restricting the data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please advise how to correct my expression.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nihal&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Feb 2019 10:55:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-week-Vs-Last-Year-current-week-data-Depending-on-reload/m-p/1538697#M439308</guid>
      <dc:creator>nihalbuddy09</dc:creator>
      <dc:date>2019-02-02T10:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Current week Vs Last Year current week data, Depending on reload date</title>
      <link>https://community.qlik.com/t5/QlikView/Current-week-Vs-Last-Year-current-week-data-Depending-on-reload/m-p/1539069#M439328</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am getting number of examples in our community related to display Last year's same week data, but unable to find the one for my scenario.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Someone please advise how can I achieve my scenario.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nihal&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 12:54:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-week-Vs-Last-Year-current-week-data-Depending-on-reload/m-p/1539069#M439328</guid>
      <dc:creator>nihalbuddy09</dc:creator>
      <dc:date>2019-02-04T12:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: Current week Vs Last Year current week data, Depending on reload date</title>
      <link>https://community.qlik.com/t5/QlikView/Current-week-Vs-Last-Year-current-week-data-Depending-on-reload/m-p/1539201#M439333</link>
      <description>&lt;P&gt;You have to change the last year variables to be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Let vLYWeekStart = makedate(year($(vWeekStart)-1),month($(vWeekStart)),day($(vWeekStart)));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Let vLYWeekEnd = makedate(year($(vWeekEnd)-1),month($(vWeekEnd)),day($(vWeekEnd)));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Carlos&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 16:28:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-week-Vs-Last-Year-current-week-data-Depending-on-reload/m-p/1539201#M439333</guid>
      <dc:creator>CarlosAMonroy</dc:creator>
      <dc:date>2019-02-04T16:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: Current week Vs Last Year current week data, Depending on reload date</title>
      <link>https://community.qlik.com/t5/QlikView/Current-week-Vs-Last-Year-current-week-data-Depending-on-reload/m-p/1540355#M439392</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;We have achieved the required results by creating two more variables&amp;nbsp;and modifying the LY's expression.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are the additional variables and Last year same week expression which we have used. Hope it will be useful to someone at sometime &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let vDaystoAddforLYThisWeek = pick( wildmatch(weekday(today(2)),'*Mon*','*Tue*','*Wed*','*Thu*','*Fri*','*Sat*','*Sun*'),0,1,2,3,4,5,6);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let vLYWeekEndDaysAdded = Date('$(vLYWeekStart)'+$(vDaystoAddforLYThisWeek));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;CalendarDate={'&amp;gt;=$(vLYWeekStart)&amp;lt;=$(vLYWeekEndDaysAdded)'}&amp;gt;}&lt;SPAN&gt;(UnitVolume))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you Carlos for looking on to this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nihal&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 15:01:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-week-Vs-Last-Year-current-week-data-Depending-on-reload/m-p/1540355#M439392</guid>
      <dc:creator>nihalbuddy09</dc:creator>
      <dc:date>2019-02-06T15:01:47Z</dc:date>
    </item>
  </channel>
</rss>

