<?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: Set a different First Month of The Year in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-a-different-First-Month-of-The-Year/m-p/914842#M652403</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you have a mastercalendar you may add columns for fiscal month, fiscal year (one way by inline table)&lt;/P&gt;&lt;P&gt;in your Charts you use the fiscal month as dimension&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Aug 2015 09:42:28 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-08-07T09:42:28Z</dc:date>
    <item>
      <title>Set a different First Month of The Year</title>
      <link>https://community.qlik.com/t5/QlikView/Set-a-different-First-Month-of-The-Year/m-p/914841#M652401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Qlik Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to assign a different start month that would align to our Fiscal Year, ours starts every July.&lt;/P&gt;&lt;P&gt;Are there other ways to change the first month of the year?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The way I did is by SQL script like this one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;.....CASE &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN DATE(CONVERT_TZ(j.created_at,"+00:00","+10:00")) BETWEEN '2007-07-01' AND '2008-06-30' THEN 2008&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN DATE(CONVERT_TZ(j.created_at,"+00:00","+10:00")) BETWEEN '2008-07-01' AND '2009-06-30' THEN 2009.....&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;.....CASE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN MONTH(CONVERT_TZ(j.created_at,"+00:00","+10:00")) =1 THEN 7&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN MONTH(CONVERT_TZ(j.created_at,"+00:00","+10:00")) =2 THEN 8&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;.....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having a doubt that eventually this would lead to data errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 05:41:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-a-different-First-Month-of-The-Year/m-p/914841#M652401</guid>
      <dc:creator />
      <dc:date>2015-08-07T05:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: Set a different First Month of The Year</title>
      <link>https://community.qlik.com/t5/QlikView/Set-a-different-First-Month-of-The-Year/m-p/914842#M652403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you have a mastercalendar you may add columns for fiscal month, fiscal year (one way by inline table)&lt;/P&gt;&lt;P&gt;in your Charts you use the fiscal month as dimension&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 09:42:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-a-different-First-Month-of-The-Year/m-p/914842#M652403</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-07T09:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set a different First Month of The Year</title>
      <link>https://community.qlik.com/t5/QlikView/Set-a-different-First-Month-of-The-Year/m-p/914843#M652405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use this code in my master calendar to get the Fiscal Year and Period from the calendar date (CalDate / CalMonth / CalYear):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Fiscal year fields - GL Year&lt;/P&gt;&lt;P&gt;CalYear + If(CalMonth &amp;lt; $(zGLYearStartMonth), 0, 1) As GLYear,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Fiscal year fields - GL Period&lt;/P&gt;&lt;P&gt;If (CalMonth &amp;gt;= $(zGLYearStartMonth),&lt;/P&gt;&lt;P&gt;&amp;nbsp; If(CalDay &amp;gt; $(zLastDOM), CalMonth - $(zGLYearStartMonth) + 2, CalMonth - $(zGLYearStartMonth) + 1),&lt;/P&gt;&lt;P&gt;&amp;nbsp; If(CalDay &amp;gt; $(zLastDOM), CalMonth + (12 - $(zGLYearStartMonth) + 2), CalMonth + (12 - $(zGLYearStartMonth) + 1)))&amp;nbsp;&amp;nbsp; As GLPeriodM,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The variables:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;zGLYearStartMonth first month of fiscal year&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;zLastDOM last day of the month of fiscal period (set to 31 or greater if the fiscal periods correspond to calendar months)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 09:57:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-a-different-First-Month-of-The-Year/m-p/914843#M652405</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-08-07T09:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Set a different First Month of The Year</title>
      <link>https://community.qlik.com/t5/QlikView/Set-a-different-First-Month-of-The-Year/m-p/914844#M652408</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;Attached is a calendar. in the calendar tab is a variable in which you change the first month of a fiscal year&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;remember to set the Calendar Type to "always only 1 selected"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;essentially you are duplicating your master calendar for different calendar types and then selecting the calendar type you want to work with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since all your time data calculations and graphs will work with the new YEAR and MONTH set up - things will automatically change based on the calendar type selections.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Gareth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 10:08:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-a-different-First-Month-of-The-Year/m-p/914844#M652408</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-07T10:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set a different First Month of The Year</title>
      <link>https://community.qlik.com/t5/QlikView/Set-a-different-First-Month-of-The-Year/m-p/914845#M652411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Gareth, I cannot load .qvw format files. May I take a look at your script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2015 00:03:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-a-different-First-Month-of-The-Year/m-p/914845#M652411</guid>
      <dc:creator />
      <dc:date>2015-08-10T00:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set a different First Month of The Year</title>
      <link>https://community.qlik.com/t5/QlikView/Set-a-different-First-Month-of-The-Year/m-p/914846#M652414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi May,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you put the following field in your transactions table (or whatever table contains the date):&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;Year(date(SaleDate))&amp;amp;num(Month(date(SaleDate)),'00') as YM,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then you can add this statement at the end of your load script (or anytime after the table containing YM)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;//Create fiscal year start month&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;set vFiscalMonth = 8;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;//create temp calander for all the distinct year month dates in your data&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;TCAL:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;load distinct YM,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;num(right(YM,2)) as TMonth,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;Month(MakeDate(Left(YM,4),right(YM,2) , 1)) As MONTH &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;Resident TRANSACTIONS;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;CALENDAR:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp; YM,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp; num(left(YM,4)) as YEAR, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp; TMonth as MonthSort,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp; MONTH,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp; 'Q'&amp;amp;(if(num(right(YM,2))&amp;lt;4,1,if(num(right(YM,2))&amp;lt;7,2,if(num(right(YM,2))&amp;lt;10,3,if(num(right(YM,2))&amp;lt;13,4))))) as Quarter,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp; 'Calendar' as CalendarType&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;resident TCAL;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;//Duplicates calendar but for Fiscal Year&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;Concatenate(CALENDAR)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp; YM,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp; if(TMonth&amp;lt;$(vFiscalMonth),num(left(YM,4)),num(left(YM,4))+1) as YEAR, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp; if(TMonth&amp;lt;$(vFiscalMonth),TMonth+12-$(vFiscalMonth)+1,TMonth-$(vFiscalMonth)+1) as MonthSort,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp; MONTH,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp; 'Q'&amp;amp;(if(num(right(YM,2))&amp;lt;4,4,if(num(right(YM,2))&amp;lt;7,1,if(num(right(YM,2))&amp;lt;10,2,if(num(right(YM,2))&amp;lt;13,3))))) as Quarter,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp; 'Fiscal' as CalendarType&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;resident TCAL;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;Drop Table TCAL;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you are using your data in the front end, remember to use YEAR and MONTH when you deal with date information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;NB: create a listbox for CalendarType - select 1 , then right click properties and change to "Always only 1 selected" - this is because multiple calendars duplicate data due to there being both a Fiscal YEAR MONTH&amp;nbsp; and a Calendar YEAR MONTH pointing to the same data so you want to restrict it to only 1 set at all times.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps.. let me know if you have problems&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Gareth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p.s. The MonthSort field is there for if you want to make the list boxes sort the order based on the calendar type. so for fiscal it will go month AUG,SEP,OCT,NOV,DEC,JAN,...JUL and for normal Calendar it will go JAN,FEB,MAR...DEC - also handy for when you make charts.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2015 06:54:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-a-different-First-Month-of-The-Year/m-p/914846#M652414</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-10T06:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: Set a different First Month of The Year</title>
      <link>https://community.qlik.com/t5/QlikView/Set-a-different-First-Month-of-The-Year/m-p/914847#M652417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all for the time to respond to my query! I found a helpful blog from HIC &lt;A href="https://community.qlik.com/qlik-blogpost/3138"&gt;Fiscal Year&lt;/A&gt;. It worked. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 02:51:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-a-different-First-Month-of-The-Year/m-p/914847#M652417</guid>
      <dc:creator />
      <dc:date>2015-08-12T02:51:47Z</dc:date>
    </item>
  </channel>
</rss>

