<?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 Financial Year, Quarter, Month, Week and Weekday script... in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Financial-Year-Quarter-Month-Week-and-Weekday-script/m-p/447443#M695101</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;Can anyone help me with the following please?:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question:&lt;/P&gt;&lt;P&gt;You are only given the transaction date in your transactions table and your client requires you to be able to show them their data by Financial Year, Quarter, Month, Week and Week Day&lt;/P&gt;&lt;P&gt;Write the script that will enable you to create the new values for each of the measures listed above. The financial year end is 28 February 2011&lt;/P&gt;&lt;P&gt;Then confirm the Financial Year, Quarter, Month, Week and Weekday for the following date: 15/06/2011&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Mertin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 May 2013 09:28:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-05-10T09:28:11Z</dc:date>
    <item>
      <title>Financial Year, Quarter, Month, Week and Weekday script...</title>
      <link>https://community.qlik.com/t5/QlikView/Financial-Year-Quarter-Month-Week-and-Weekday-script/m-p/447443#M695101</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;Can anyone help me with the following please?:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question:&lt;/P&gt;&lt;P&gt;You are only given the transaction date in your transactions table and your client requires you to be able to show them their data by Financial Year, Quarter, Month, Week and Week Day&lt;/P&gt;&lt;P&gt;Write the script that will enable you to create the new values for each of the measures listed above. The financial year end is 28 February 2011&lt;/P&gt;&lt;P&gt;Then confirm the Financial Year, Quarter, Month, Week and Weekday for the following date: 15/06/2011&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Mertin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 May 2013 09:28:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Financial-Year-Quarter-Month-Week-and-Weekday-script/m-p/447443#M695101</guid>
      <dc:creator />
      <dc:date>2013-05-10T09:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: Financial Year, Quarter, Month, Week and Weekday script...</title>
      <link>https://community.qlik.com/t5/QlikView/Financial-Year-Quarter-Month-Week-and-Weekday-script/m-p/447444#M695102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;LET vDateMin = Num(MakeDate(2011,2,28)); &lt;/P&gt;&lt;P&gt;&amp;nbsp; LET vDateMax = Floor(MakeDate(2011,6,15)); &lt;/P&gt;&lt;P&gt;&amp;nbsp; LET vDateToday = Num(Today()); &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TempCalendar: &lt;/P&gt;&lt;P&gt;&amp;nbsp; LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; $(vDateMin) + RowNo() - 1 AS DateNumber, &lt;/P&gt;&lt;P&gt;&amp;nbsp; Date($(vDateMin) + RowNo() - 1) AS TempDate &lt;/P&gt;&lt;P&gt;&amp;nbsp; AUTOGENERATE 1 &lt;/P&gt;&lt;P&gt;&amp;nbsp; WHILE $(vDateMin)+IterNo()-1&amp;lt;= $(vDateMax); &lt;/P&gt;&lt;P&gt;Calendar: &lt;/P&gt;&lt;P&gt;&amp;nbsp; LOAD&lt;/P&gt;&lt;P&gt; Date(TempDate,'DD-MM-YYYY' ) AS CalendarDate, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Day(TempDate) AS CalendarDayOfMonth, &lt;/P&gt;&lt;P&gt;&amp;nbsp; WeekDay(TempDate) AS CalendarDayName,&lt;/P&gt;&lt;P&gt;Month(TempDate) AS CalendarMonthName, &lt;/P&gt;&lt;P&gt;&amp;nbsp; 'Q' &amp;amp; Ceil(Month(TempDate)/3) AS CalendarQuarter,&lt;/P&gt;&lt;P&gt; 'FY' &amp;amp; Right( Year(TempDate),2) as YearQtrfy,&lt;/P&gt;&lt;P&gt;YearName(TempDate,0,2)as FiscalYear&lt;/P&gt;&lt;P&gt;RESIDENT TempCalendar ORDER BY TempDate ASC; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DROP TABLE TempCalendar; &lt;/P&gt;&lt;P&gt;join with your date field table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 May 2013 09:42:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Financial-Year-Quarter-Month-Week-and-Weekday-script/m-p/447444#M695102</guid>
      <dc:creator>er_mohit</dc:creator>
      <dc:date>2013-05-10T09:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: Financial Year, Quarter, Month, Week and Weekday script...</title>
      <link>https://community.qlik.com/t5/QlikView/Financial-Year-Quarter-Month-Week-and-Weekday-script/m-p/447445#M695103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can map the mastercalender and by using the functions like below&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;Date(TransDate) as Dates,&lt;/P&gt;&lt;P&gt;Month(TransDate) as MonthNumber,&lt;/P&gt;&lt;P&gt;MonthName(TransDate) as MonthName&lt;/P&gt;&lt;P&gt;QuarterStart(TransDate),&lt;/P&gt;&lt;P&gt;Week(TransDate),&lt;/P&gt;&lt;P&gt;WeekName(TransDate)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the data in terms of month , week, date and many other&amp;nbsp; can be obtained.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Revathy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 May 2013 09:54:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Financial-Year-Quarter-Month-Week-and-Weekday-script/m-p/447445#M695103</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-10T09:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: Financial Year, Quarter, Month, Week and Weekday script...</title>
      <link>https://community.qlik.com/t5/QlikView/Financial-Year-Quarter-Month-Week-and-Weekday-script/m-p/447446#M695104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, logically I would like to do something like the following, except that I need it in the Qlikview syntax, if you &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could help me with that please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TestDate = 15/06/2011;&lt;/P&gt;&lt;P&gt;StartMonth = 3;&lt;/P&gt;&lt;P&gt;EndMonth = 2;&lt;/P&gt;&lt;P&gt;CalYear = Year(TestDate);&lt;/P&gt;&lt;P&gt;CalMonth = Month(TestDate);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FinYear = CalYear + 1;&lt;/P&gt;&lt;P&gt;if CalMonth &amp;lt; StartMonth then FinYear = FinYear - 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FinMonth = CalMonth - EndMonth;&lt;/P&gt;&lt;P&gt;if CalMonth &amp;lt; StartMonth then FinMonth = FinMonth + 12;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if FinMonth in (1,2,3) then Quarter = 1;&lt;/P&gt;&lt;P&gt;else if FinMonth in(4,5,6) then Quarter = 2;&lt;/P&gt;&lt;P&gt;else if FinMonth in(7,8,9) then Quarter = 3;&lt;/P&gt;&lt;P&gt;else Quarter = 4;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Days_Between = TestDate - mdy(EndMonth,28,FinYear-1);&lt;/P&gt;&lt;P&gt;Week = floor(Days_Between / 52.1775);&lt;/P&gt;&lt;P&gt;WeekDay = WeekDay(TestDate);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 May 2013 11:40:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Financial-Year-Quarter-Month-Week-and-Weekday-script/m-p/447446#M695104</guid>
      <dc:creator />
      <dc:date>2013-05-10T11:40:28Z</dc:date>
    </item>
  </channel>
</rss>

