<?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: FinYearWeek Calculations in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/FinYearWeek-Calculations/m-p/1414832#M813062</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you set in your variable environment like&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET FirstWeekDay=2; // 1 Starts from Sunday.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Sep 2017 11:54:32 GMT</pubDate>
    <dc:creator>Anil_Babu_Samineni</dc:creator>
    <dc:date>2017-09-26T11:54:32Z</dc:date>
    <item>
      <title>FinYearWeek Calculations</title>
      <link>https://community.qlik.com/t5/QlikView/FinYearWeek-Calculations/m-p/1414831#M813061</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;How can you calculate the Financial Year and Week number from a date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;For example:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All information I have is a date column which contains dates in the format 'YYYY/MM/DD'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The requirement is that I get the Financial Year and the week number as a code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Week(Date) provides the week of the year.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Year(Addmonths(Date),12) will provide me with the financial year.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, using the below does not yield the correct result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Year(Addmonths(DayDate,12)) &amp;amp; num(week(addmonths(DayDate,6)),'00')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Financial Year starts in July of the year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Qlikview starts the week on a Saturday to Friday period, and that is not correct, my weeks need to start on a monday and finish on a sunday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;My variables are set up as below:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';&lt;/P&gt;&lt;P&gt;SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';&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/FinYearWeek-Calculations/m-p/1414831#M813061</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: FinYearWeek Calculations</title>
      <link>https://community.qlik.com/t5/QlikView/FinYearWeek-Calculations/m-p/1414832#M813062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you set in your variable environment like&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET FirstWeekDay=2; // 1 Starts from Sunday.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2017 11:54:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FinYearWeek-Calculations/m-p/1414832#M813062</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-09-26T11:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: FinYearWeek Calculations</title>
      <link>https://community.qlik.com/t5/QlikView/FinYearWeek-Calculations/m-p/1414833#M813063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hi Ruan,&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;Have a look at the blogs below by Henric Cronstrom &lt;A _jive_internal="true" class="jiveTT-hover-user jive-link-profile-small" data-containerid="-1" data-containertype="-1" data-objectid="4003" data-objecttype="3" href="https://community.qlik.com/people/hic" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3778c7;"&gt;hic&lt;/A&gt; which detail how to setup calendars for Financial Year &amp;amp; Weeks starting at different months.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A _jive_internal="true" data-containerid="2588" data-containertype="37" data-objectid="3527" data-objecttype="38" href="https://community.qlik.com/blogs/qlikviewdesignblog/2014/01/21/week-start" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3778c7;"&gt;Redefining the Week Start&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A _jive_internal="true" data-containerid="2588" data-containertype="37" data-objectid="3545" data-objecttype="38" href="https://community.qlik.com/blogs/qlikviewdesignblog/2014/01/27/week-numbers" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3778c7;"&gt;Redefining the Week Numbers&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2017 11:56:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FinYearWeek-Calculations/m-p/1414833#M813063</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2017-09-26T11:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: FinYearWeek Calculations</title>
      <link>https://community.qlik.com/t5/QlikView/FinYearWeek-Calculations/m-p/1414834#M813064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you doing this in script if so, this works as From Date we need to go back 180 Days that means we need to calculate how many dates week has. So, 180 / 7 = 25. If Today() it returns 39 - 25 = 13. And output returns here 2017/13 so from this we are picking Right side of 2 strings and it should return 13 as always..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2017 13:15:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FinYearWeek-Calculations/m-p/1414834#M813064</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-09-26T13:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: FinYearWeek Calculations</title>
      <link>https://community.qlik.com/t5/QlikView/FinYearWeek-Calculations/m-p/1414835#M813065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solved this by using the below formula,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For any future enquiries, bare in mind that our financial year period starts in july.&amp;nbsp; And we work on a Mon-Sun Period.&amp;nbsp; The formula should just be adjusted accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Year(Addmonths(Date(DayDate,'YYYY/MM/DD'),12)) &amp;amp; num(if(Week(DayDate)+26 &amp;gt; 52,Week(DayDate)-26,Week(DayDate)+26),'00')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2017 13:29:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FinYearWeek-Calculations/m-p/1414835#M813065</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-26T13:29:11Z</dc:date>
    </item>
  </channel>
</rss>

