<?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 Year end Week 52 alternative method? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Year-end-Week-52-alternative-method/m-p/1264757#M861897</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've weekly report like below, when user select Year as 2017 and week as 1 then my report having issue for showing last week as 0 so i just to like below expression. is there any alternative method to make easier?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;column header for last week &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;='Qty Sold WK ' &amp;amp; if($(vLastWeek)=0,52,$(vLastWeek))&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Last Week Sold Qty expression,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If($(vLastWeek)=0, sum({&amp;lt;Week={'52'}&amp;gt;} SoldQty), sum({&amp;lt;Week={'$(vLastWeek)'}&amp;gt;} SoldQty))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;created variable,&lt;/P&gt;&lt;P&gt;vLastWeek=Max(Week(Date))-1&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Week52 issue.jpg" class="jive-image image-1" src="/legacyfs/online/149782_Week52 issue.jpg" style="height: 392px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>devarasu07</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Year end Week 52 alternative method?</title>
      <link>https://community.qlik.com/t5/QlikView/Year-end-Week-52-alternative-method/m-p/1264757#M861897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've weekly report like below, when user select Year as 2017 and week as 1 then my report having issue for showing last week as 0 so i just to like below expression. is there any alternative method to make easier?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;column header for last week &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;='Qty Sold WK ' &amp;amp; if($(vLastWeek)=0,52,$(vLastWeek))&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Last Week Sold Qty expression,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If($(vLastWeek)=0, sum({&amp;lt;Week={'52'}&amp;gt;} SoldQty), sum({&amp;lt;Week={'$(vLastWeek)'}&amp;gt;} SoldQty))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;created variable,&lt;/P&gt;&lt;P&gt;vLastWeek=Max(Week(Date))-1&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Week52 issue.jpg" class="jive-image image-1" src="/legacyfs/online/149782_Week52 issue.jpg" style="height: 392px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Year-end-Week-52-alternative-method/m-p/1264757#M861897</guid>
      <dc:creator>devarasu07</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Year end Week 52 alternative method?</title>
      <link>https://community.qlik.com/t5/QlikView/Year-end-Week-52-alternative-method/m-p/1264758#M861898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Devarasu, If week is generated with Week(Date) and you want the last week you can try with:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vLastWeek=&lt;/SPAN&gt;Week(Max(Date)-7)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, that gives the correct result for week 52? it's supposed to be week 52 of last year, didn't? Maybe you need a year-week field&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2017 22:57:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Year-end-Week-52-alternative-method/m-p/1264758#M861898</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2017-01-17T22:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: Year end Week 52 alternative method?</title>
      <link>https://community.qlik.com/t5/QlikView/Year-end-Week-52-alternative-method/m-p/1264759#M861899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are trying to get value for last week of 2016, you may need to change year as well by Max(Year)-1 in your set expression, currently it might be showing value for year 2017 and week 52, which is future date and may be showing 0 due to that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2017 23:00:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Year-end-Week-52-alternative-method/m-p/1264759#M861899</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2017-01-17T23:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: Year end Week 52 alternative method?</title>
      <link>https://community.qlik.com/t5/QlikView/Year-end-Week-52-alternative-method/m-p/1264760#M861900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suggest using Dates instead of just weeks to achieve this kind of requirement&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2017 02:49:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Year-end-Week-52-alternative-method/m-p/1264760#M861900</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-01-18T02:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: Year end Week 52 alternative method?</title>
      <link>https://community.qlik.com/t5/QlikView/Year-end-Week-52-alternative-method/m-p/1264761#M861901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Devarasu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am sure that you are doing well!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe your data is at week's granularity. I have further modified the definition of vLastWeek variable to retrieve expected week no. Please use &amp;amp; validate below given updated definitions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Updated Variable Definition:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LET vLastWeek = If(Week(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Date&lt;/SPAN&gt;) = 1, Week(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Date&lt;/SPAN&gt; - (Day(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Date&lt;/SPAN&gt;) + 1)), Week(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Date&lt;/SPAN&gt;)-1) ;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Updated column header for last week:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;='Qty Sold WK ' &amp;amp; $(vLastWeek)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Updated Last Week Sold Qty expression:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum({&amp;lt;Week={'$(vLastWeek)'}&amp;gt;} SoldQty)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hope this will be helpful.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Regards!&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2017 05:46:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Year-end-Week-52-alternative-method/m-p/1264761#M861901</guid>
      <dc:creator>rahulpawarb</dc:creator>
      <dc:date>2017-01-18T05:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: Year end Week 52 alternative method?</title>
      <link>https://community.qlik.com/t5/QlikView/Year-end-Week-52-alternative-method/m-p/1264762#M861902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It may be worth adding a relative week field to your data model, so the current week is week 0, last week is week1, etc.&lt;/P&gt;&lt;P&gt;This&amp;nbsp; blog gives an overview of the technique.&amp;nbsp; &lt;A href="https://community.qlik.com/qlik-blogpost/3157"&gt;Relative Calendar Fields&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may need to combine the week() function and weekyear(), as the year when dealing with weeks at the start and end of the year can differ from the calendar year. Or use the weekname() function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2017 08:03:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Year-end-Week-52-alternative-method/m-p/1264762#M861902</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2017-01-18T08:03:56Z</dc:date>
    </item>
  </channel>
</rss>

