<?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: How to create a field based fiscal calendar script in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-create-a-field-based-fiscal-calendar-script/m-p/1562432#M40973</link>
    <description>Thanks for the script, I have added in my application and working fine.&lt;BR /&gt;&lt;BR /&gt;But for quarter filter, I have to show values like below in drop down:-&lt;BR /&gt;what should be the script for this, data should come till 2022&lt;BR /&gt;Q1 FY19&lt;BR /&gt;Q2 FY19&lt;BR /&gt;Q3 FY19&lt;BR /&gt;Q4 FY19&lt;BR /&gt;Q1 FY20&lt;BR /&gt;.....&lt;BR /&gt;...&lt;BR /&gt;Q4 FY22&lt;BR /&gt;</description>
    <pubDate>Thu, 28 Mar 2019 12:46:42 GMT</pubDate>
    <dc:creator>abc_18</dc:creator>
    <dc:date>2019-03-28T12:46:42Z</dc:date>
    <item>
      <title>How to create a field based fiscal calendar script</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-create-a-field-based-fiscal-calendar-script/m-p/1562197#M40950</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a date field in my script, how to create a fisal calendar based on that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have gone through calendar scripts in qlikcommunity, but most of them are using fiscal month field, I don't have that field available in script, just have date field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Plesae suggest based on date field how can I create a fiscal calendar.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 05:45:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-create-a-field-based-fiscal-calendar-script/m-p/1562197#M40950</guid>
      <dc:creator>abc_18</dc:creator>
      <dc:date>2019-03-28T05:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a field based fiscal calendar script</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-create-a-field-based-fiscal-calendar-script/m-p/1562242#M40951</link>
      <description>&lt;P&gt;Use the below script.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/New-to-QlikView/Fiscal-calendar/m-p/613708" target="_blank"&gt;https://community.qlik.com/t5/New-to-QlikView/Fiscal-calendar/m-p/613708&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/QlikView-Documents/Fiscal-and-Standard-Calendar-generation/ta-p/1480822" target="_blank"&gt;https://community.qlik.com/t5/QlikView-Documents/Fiscal-and-Standard-Calendar-generation/ta-p/1480822&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It may seems like fiscal month is used here and not date but that's not the case. You can just change the date field name to your date field and it shall work, You may need to define from which month your fiscal year starts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Pradosh&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 07:31:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-create-a-field-based-fiscal-calendar-script/m-p/1562242#M40951</guid>
      <dc:creator>pradosh_thakur</dc:creator>
      <dc:date>2019-03-28T07:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a field based fiscal calendar script</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-create-a-field-based-fiscal-calendar-script/m-p/1562340#M40962</link>
      <description>&lt;P&gt;Create a calendar in your script using following script:&lt;/P&gt;&lt;P&gt;TEMP:&lt;BR /&gt;LOAD Max([Posting Date]) AS MaxDate&lt;BR /&gt;Table Name;&lt;/P&gt;&lt;P&gt;LET varMaxDate = Num(peek('MaxDate', 0, 'TEMP'));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;TEMP1:&lt;BR /&gt;LOAD Min([Posting Date]) AS MinDate&lt;BR /&gt;Table Name;&lt;/P&gt;&lt;P&gt;LET varMinDate = Num(peek('MinDate', 0, 'TEMP1'));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;//*************** Temporary Calendar ***************&lt;BR /&gt;TempCalendar:&lt;BR /&gt;LOAD&lt;BR /&gt;$(varMinDate)+IterNo()-1 AS Num,&lt;BR /&gt;Date($(varMinDate)+IterNo()-1) AS TempDate&lt;BR /&gt;AUTOGENERATE 1 WHILE $(varMinDate)+IterNo()-1&amp;lt;= $(varMaxDate);&lt;/P&gt;&lt;P&gt;//*************** Master Calendar ***************&lt;BR /&gt;MasterCalendar:&lt;BR /&gt;LOAD TempDate AS [Posting Date],&lt;BR /&gt;TempDate,&lt;BR /&gt;TempDate AS %Date,&lt;BR /&gt;YearName(TempDate,0,4) AS FinancialYear,&lt;BR /&gt;Date(Yearstart(TempDate,0,4)) AS YearStart,&lt;BR /&gt;Date(Yearend(TempDate,0,4)) AS YearEnd,&lt;BR /&gt;Num(Date(Yearstart(TempDate,0,4),'YYYY')) AS FinancialYearNo,&lt;BR /&gt;date(MonthStart(TempDate),'MMM-YY') AS MonthYear,&lt;BR /&gt;Month(TempDate) AS MonthName,&lt;BR /&gt;If(Num(Month(TempDate))&amp;gt;3,Num(Month(TempDate))-3,Num(Month(TempDate))+9) AS MonthNumber,&lt;BR /&gt;MonthStart(TempDate) AS MonthStart,&lt;BR /&gt;MonthEnd(TempDate) AS MonthEnd,&lt;BR /&gt;Year(TempDate) AS Year,&lt;BR /&gt;'Q' &amp;amp; alt(if(Month(TempDate)&amp;lt;4,4),if(Month(TempDate)&amp;lt;7,1),if(Month(TempDate)&amp;lt;10,2),3) AS Quarter,&lt;BR /&gt;quarterstart(TempDate,0,4) AS QuarterStart,&lt;BR /&gt;quarterend(TempDate,0,4) AS QuarterEnd,&lt;BR /&gt;quartername(TempDate,0,4) AS QuarterName,&lt;BR /&gt;if(Num(Month(TempDate))&amp;gt;3,Year(TempDate)+1,Year(TempDate)) AS FiscalYear,&lt;BR /&gt;AutoNumber(Month(TempDate) &amp;amp; Year(TempDate)) AS Sequential,&lt;BR /&gt;NUM(TempDate) AS DateNum,&lt;BR /&gt;monthname(TempDate) AS CalMonthYear,&lt;BR /&gt;Day(TempDate) &amp;amp;'-'&amp;amp; Date(TempDate,'MMM') AS DayMon,&lt;BR /&gt;num(Year(TempDate)&amp;amp;num(Month(TempDate),'00')) as YEAR_MONTH, // Link between tables for previous month / year selection&lt;BR /&gt;num((Year(TempDate)-1)&amp;amp;num(Month(TempDate),'00')) AS YEAR_MONTH_PREVIOUS, // Link between tables for previous month / year selection&lt;BR /&gt;num((Year(TempDate)-2)&amp;amp;num(Month(TempDate),'00')) AS P_YEAR_MONTH_PREVIOUS,&lt;BR /&gt;Day(Monthend(TempDate)) AS NumberOfDaysInMonth,&lt;BR /&gt;ceil(QuarterEnd(TempDate)-QuarterStart(TempDate)) AS NumberOfDaysInQtr,&lt;BR /&gt;Date(Yearend(TempDate,0,4)) - Date(Yearstart(TempDate,0,4)) as NumberOfDaysInYr,&lt;BR /&gt;if( YearName(TempDate,0,4)='2017-2018',1,0) as YearFlag&lt;BR /&gt;&lt;BR /&gt;RESIDENT TempCalendar&lt;BR /&gt;ORDER BY TempDate Asc;&lt;/P&gt;&lt;P&gt;DROP Table TempCalendar;&lt;BR /&gt;DROP Table TEMP;&lt;BR /&gt;DROP Table TEMP1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 10:09:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-create-a-field-based-fiscal-calendar-script/m-p/1562340#M40962</guid>
      <dc:creator>vikasmahajan</dc:creator>
      <dc:date>2019-03-28T10:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a field based fiscal calendar script</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-create-a-field-based-fiscal-calendar-script/m-p/1562432#M40973</link>
      <description>Thanks for the script, I have added in my application and working fine.&lt;BR /&gt;&lt;BR /&gt;But for quarter filter, I have to show values like below in drop down:-&lt;BR /&gt;what should be the script for this, data should come till 2022&lt;BR /&gt;Q1 FY19&lt;BR /&gt;Q2 FY19&lt;BR /&gt;Q3 FY19&lt;BR /&gt;Q4 FY19&lt;BR /&gt;Q1 FY20&lt;BR /&gt;.....&lt;BR /&gt;...&lt;BR /&gt;Q4 FY22&lt;BR /&gt;</description>
      <pubDate>Thu, 28 Mar 2019 12:46:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-create-a-field-based-fiscal-calendar-script/m-p/1562432#M40973</guid>
      <dc:creator>abc_18</dc:creator>
      <dc:date>2019-03-28T12:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a field based fiscal calendar script</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-create-a-field-based-fiscal-calendar-script/m-p/1562558#M40999</link>
      <description>&lt;P&gt;Below script I am using in my script:-&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;data should come till 2022 like below format&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Q1 FY19&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Q2 FY19&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Q3 FY19&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Q4 FY19&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Q1 FY20&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;.....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Q4 FY22&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SET vFiscalYearStartMonth = 10;&lt;/P&gt;&lt;P&gt;LET vStartDate = Num(YearStart(Today(), -1));//will give 1/1/2018&lt;/P&gt;&lt;P&gt;LET vEndDate = Num(YearEnd(Today()));&lt;/P&gt;&lt;P&gt;FiscalCalendar:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;'FY' &amp;amp; Dual('Q' &amp;amp; Ceil(FiscalMonth/3), Ceil(FiscalMonth/3)) AS FiscalQuarter, // Fiscal Calendar Quarter&lt;/P&gt;&lt;P&gt;Dual(Text(Date(MonthEnd(Date), 'MMM')), FiscalMonth) AS FiscalMonthName; // Fiscal Calendar Month Name&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;Year(Date) AS Year, // Standard Calendar Year&lt;/P&gt;&lt;P&gt;Month(Date) AS Month, // Standard Calendar Month&lt;/P&gt;&lt;P&gt;Date(MonthEnd(Date), 'MMM') AS MonthName, // Standard Calendar Month Name&lt;/P&gt;&lt;P&gt;Dual('Q' &amp;amp; Ceil(Month(Date)/3), Ceil(Month(Date)/3)) AS Quarter, // Standard Calendar Quarter&lt;/P&gt;&lt;P&gt;Mod(Month(Date) - $(vFiscalYearStartMonth), 12)+1 AS FiscalMonth, // Fiscal Calendar Month&lt;/P&gt;&lt;P&gt;YearName(Date, 0, $(vFiscalYearStartMonth)) AS FiscalYear; // Fiscal Calendar Year&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Date($(vStartDate) + RangeSum(Peek('RowNum'), 1) - 1) AS Date,&lt;/P&gt;&lt;P&gt;RangeSum(Peek('RowNum'), 1) AS RowNum&lt;/P&gt;&lt;P&gt;AutoGenerate vEndDate - vStartDate + 1;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 17:04:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-create-a-field-based-fiscal-calendar-script/m-p/1562558#M40999</guid>
      <dc:creator>abc_18</dc:creator>
      <dc:date>2019-03-28T17:04:41Z</dc:date>
    </item>
  </channel>
</rss>

