<?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 Rolling 52 weeks - Stumped in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Rolling-52-weeks-Stumped/m-p/443693#M1152265</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you to anyone who has helped me previously on this issue, but am really struggling to get my table to show a rolling 52 week period&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the expression ready which is currently looking at this years&amp;nbsp; FY data and - last years FY data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But now instead of this years V's last year, I need to show a rolling 52 week period &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone kindly help me write this, or tell me exactly what I need to have in order for this to work I.e. Do I need to look at Week Number, and if so how do I calculate the financial year Apr-Mar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help or advice is greatly appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;=(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;YEAR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt; = {&lt;/SPAN&gt;&lt;STRONG style="color: gray; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;EM&gt;$(=Max(YEAR))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;LOCAL_PATIENT_IDENTIFIER&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;)-&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;YEAR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt; = {&lt;/SPAN&gt;&lt;STRONG style="color: gray; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;EM&gt;$(=Max(YEAR)-1)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;LOCAL_PATIENT_IDENTIFIER&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Helen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 May 2013 14:57:17 GMT</pubDate>
    <dc:creator>helen_pip</dc:creator>
    <dc:date>2013-05-09T14:57:17Z</dc:date>
    <item>
      <title>Rolling 52 weeks - Stumped</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-52-weeks-Stumped/m-p/443693#M1152265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you to anyone who has helped me previously on this issue, but am really struggling to get my table to show a rolling 52 week period&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the expression ready which is currently looking at this years&amp;nbsp; FY data and - last years FY data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But now instead of this years V's last year, I need to show a rolling 52 week period &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone kindly help me write this, or tell me exactly what I need to have in order for this to work I.e. Do I need to look at Week Number, and if so how do I calculate the financial year Apr-Mar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help or advice is greatly appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;=(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;YEAR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt; = {&lt;/SPAN&gt;&lt;STRONG style="color: gray; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;EM&gt;$(=Max(YEAR))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;LOCAL_PATIENT_IDENTIFIER&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;)-&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;YEAR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt; = {&lt;/SPAN&gt;&lt;STRONG style="color: gray; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;EM&gt;$(=Max(YEAR)-1)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;LOCAL_PATIENT_IDENTIFIER&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Helen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 14:57:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-52-weeks-Stumped/m-p/443693#M1152265</guid>
      <dc:creator>helen_pip</dc:creator>
      <dc:date>2013-05-09T14:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 52 weeks - Stumped</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-52-weeks-Stumped/m-p/443694#M1152266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Helen, &lt;/P&gt;&lt;P&gt;We might need a few more details to give you the best approach -&lt;/P&gt;&lt;P&gt;Are you using dates or just week numbers? Do you want everything from a year ago from the month end selected or week selected or day selected?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your granularity is by day then I would set a variable to = a year ago from date selected [eg. vYear_Last = Date(AddYears(vDate,-1),'DD/MM/YYYY')] where vDate = the date date selected (or month end etc).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use set analysis to say give me everything less than the date selected and more than vYear_Last.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your data is linked to the calendar table then you'll need to remove those selections first&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg.&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Count(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;YEAR = &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;,WEEK =&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;,DATE={"&amp;lt;=$(vDate)"}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;,DATE={"&amp;gt;$(vYear_Last)"}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LOCAL_PATIENT_IDENTIFIER&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 May 2013 12:27:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-52-weeks-Stumped/m-p/443694#M1152266</guid>
      <dc:creator>juleshartley</dc:creator>
      <dc:date>2013-05-10T12:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 52 weeks - Stumped</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-52-weeks-Stumped/m-p/443695#M1152267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My data set starts from&amp;nbsp; 01/04/2012 and dates through to last month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently using dates and YEAR is calculated off a piece of Oracle SQL:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE WHEN TO_NUMBER (TO_CHAR (date, 'MM')) &amp;gt;= 4 THEN TO_NUMBER (TO_CHAR (date, 'YYYY'))&lt;/P&gt;&lt;P&gt;WHEN TO_NUMBER (TO_CHAR (date, 'MM')) &amp;lt; 4 THEN TO_NUMBER (TO_CHAR (date, 'YYYY')) - 1 END AS Year&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do however have week available ot me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;SPAN style=": ; color: #0000ff; font-size: 1;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Date&lt;/P&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Weekstart&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[REFERRAL_DATE]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), 'DD-MM-YYYY') &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;OutPatients_Week &lt;/SPAN&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;SPAN style=": ; color: #0000ff; font-size: 1;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Right&lt;/P&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;WeekName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[REFERRAL_DATE]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),2) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;week_number &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;My data is granulated to person level and numerous people can have the same date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;Thanks you for your help&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 May 2013 12:42:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-52-weeks-Stumped/m-p/443695#M1152267</guid>
      <dc:creator>helen_pip</dc:creator>
      <dc:date>2013-05-10T12:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 52 weeks - Stumped</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-52-weeks-Stumped/m-p/443696#M1152268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, but I'm not clear if you want a true 'rolling year' (ie. 365 days) or you want to go back to the beginning of the financial year, ie. 1st April..? which is year-to-date rather than rolling year&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 May 2013 13:21:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-52-weeks-Stumped/m-p/443696#M1152268</guid>
      <dc:creator>juleshartley</dc:creator>
      <dc:date>2013-05-10T13:21:09Z</dc:date>
    </item>
  </channel>
</rss>

