<?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: Help creating a master calendar with equal month or periods in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Help-creating-a-master-calendar-with-equal-month-or-periods/m-p/2037457#M85476</link>
    <description>&lt;P&gt;Hello hgreen,&lt;/P&gt;
&lt;P&gt;Here is a sample script for fiscal calendar from scratch.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;SET DateFormat = 'DD.MM.YYYY';

LOAD StartDate, EndDate, Period, if(RecNo() = 1, FiscalYear, if(Period = 1, Peek('FiscalYear') + 1, Peek('FiscalYear'))) as FiscalYear;
LOAD If(RecNo() = 1, StartDate, Date(Peek('EndDate') + 1)) as StartDate,
	 If(RecNo() = 1, EndDate, Date(Peek('EndDate') + 28)) as EndDate,
     mod(Period - 1, 13) + 1 as Period,
     FiscalYear;
LOAD StartDate, Date(StartDate + 27) as EndDate, RecNo() as Period, Year(StartDate) as FiscalYear;
LOAD Date#('26.02.2023') as StartDate AutoGenerate 26;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Feb 2023 06:16:38 GMT</pubDate>
    <dc:creator>SerhanKaraer</dc:creator>
    <dc:date>2023-02-14T06:16:38Z</dc:date>
    <item>
      <title>Help creating a master calendar with equal month or periods</title>
      <link>https://community.qlik.com/t5/App-Development/Help-creating-a-master-calendar-with-equal-month-or-periods/m-p/2036595#M85406</link>
      <description>&lt;P&gt;I am trying to create a second master calendar that it on an equal month/period schedule. Each 'month' needs to be 28 days in length starting on 2/26/23. I have not been able to find a way to implement this within my app. Below is the master calendar coding I have for my initial setup. I would like to either add the parameters to this calendar or create an additional calendar to properly show the data.&lt;/P&gt;
&lt;P&gt;/******************** Table MinMaxTemp *******************/&lt;BR /&gt;MinMaxTemp:&lt;BR /&gt;LOAD&lt;BR /&gt;Min(FieldValue('Received Date',RecNO())) as MinDate,&lt;BR /&gt;Today() as MaxDate&lt;BR /&gt;AUTOGENERATE FieldValueCount('Received Date');&lt;/P&gt;
&lt;P&gt;LET vToday = Num(Peek('MaxDate', 0, 'MinMaxTemp'));&lt;/P&gt;
&lt;P&gt;/******************** MasterCalendarTemp *******************/&lt;/P&gt;
&lt;P&gt;MasterCalendarTemp:&lt;BR /&gt;LOAD&lt;BR /&gt;Date(MinDate + IterNo() - 1) as [Received Date]&lt;BR /&gt;RESIDENT MinMaxTemp&lt;BR /&gt;WHILE MinDate + IterNo() - 1 &amp;lt;= MaxDate;&lt;/P&gt;
&lt;P&gt;DROP TABLE MinMaxTemp;&lt;/P&gt;
&lt;P&gt;/******************** CREATE MASTER CALENDAR *******************/&lt;BR /&gt;[Master Calendar]:&lt;BR /&gt;LOAD&lt;BR /&gt;[Received Date],&lt;BR /&gt;Week([Received Date]) as Week,&lt;BR /&gt;Year([Received Date]) as Year,&lt;BR /&gt;Month([Received Date]) as Month,&lt;BR /&gt;Day([Received Date]) as Day,&lt;BR /&gt;WeekDay([Received Date]) as WeekDay,&lt;BR /&gt;Dual('Q' &amp;amp; Ceil(Month([Received Date]) / 3), Ceil(Month([Received Date]) / 3)) as Quarter,&lt;BR /&gt;Date(MonthStart([Received Date]), 'M/YYYY') as MonthYear,&lt;BR /&gt;Week([Received Date]) &amp;amp; '-' &amp;amp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;If(Week([Received Date]) = 1 AND Month([Received Date]) = 12, Year([Received Date]) + 1,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;If(Match(Week ([Received Date]), 52, 53) AND&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Month([Received Date]) = 1, Year([Received Date]) - 1, Year([Received Date]))) as WeekYear,&lt;BR /&gt;If(DayNumberOfYear([Received Date]) &amp;lt;= DayNumberOfYear($(vToday)), 1, 0 ) as IsInYTD,&lt;BR /&gt;If(DayNumberOfQuarter([Received Date]) &amp;lt;= DayNumberOfQuarter($(vToday)), 1, 0) as IsInQTD,&lt;BR /&gt;If(Day([Received Date]) &amp;lt;= Day($(vToday)), 1, 0) as IsInMTD,&lt;BR /&gt;If(Month([Received Date]) = Month($(vToday)), 1, 0) as IsCurrentMonth,&lt;BR /&gt;If(Month(AddMonths([Received Date],1)) = Month($(vToday)), 1, 0) as IsLastMonth&lt;/P&gt;
&lt;P&gt;RESIDENT MasterCalendarTemp;&lt;/P&gt;
&lt;P&gt;DROP TABLE MasterCalendarTemp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have also attached an excel file to show exactly what data I'm looking for.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 14:41:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-creating-a-master-calendar-with-equal-month-or-periods/m-p/2036595#M85406</guid>
      <dc:creator>hgreen</dc:creator>
      <dc:date>2023-02-10T14:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: Help creating a master calendar with equal month or periods</title>
      <link>https://community.qlik.com/t5/App-Development/Help-creating-a-master-calendar-with-equal-month-or-periods/m-p/2037457#M85476</link>
      <description>&lt;P&gt;Hello hgreen,&lt;/P&gt;
&lt;P&gt;Here is a sample script for fiscal calendar from scratch.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;SET DateFormat = 'DD.MM.YYYY';

LOAD StartDate, EndDate, Period, if(RecNo() = 1, FiscalYear, if(Period = 1, Peek('FiscalYear') + 1, Peek('FiscalYear'))) as FiscalYear;
LOAD If(RecNo() = 1, StartDate, Date(Peek('EndDate') + 1)) as StartDate,
	 If(RecNo() = 1, EndDate, Date(Peek('EndDate') + 28)) as EndDate,
     mod(Period - 1, 13) + 1 as Period,
     FiscalYear;
LOAD StartDate, Date(StartDate + 27) as EndDate, RecNo() as Period, Year(StartDate) as FiscalYear;
LOAD Date#('26.02.2023') as StartDate AutoGenerate 26;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 06:16:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-creating-a-master-calendar-with-equal-month-or-periods/m-p/2037457#M85476</guid>
      <dc:creator>SerhanKaraer</dc:creator>
      <dc:date>2023-02-14T06:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: Help creating a master calendar with equal month or periods</title>
      <link>https://community.qlik.com/t5/App-Development/Help-creating-a-master-calendar-with-equal-month-or-periods/m-p/2037511#M85479</link>
      <description>&lt;P&gt;4 weeks months sound like a kind of a 4-4-5 / 5-4-4 / 4-5-4 calendar. Within the following links are multiple examples how to create non-gregorian calendars including the above mentioned ones and also fiscal-calendars which have an offset to the normal calendars:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Design/Non-Gregorian-calendars/ba-p/1471155" target="_blank"&gt;Non-Gregorian calendars - Qlik Community - 1471155&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/QlikView-Documents/How-to-use-Master-Calendar-and-Date-Values/ta-p/1495741" target="_blank"&gt;How to use - Master-Calendar and Date-Values - Qlik Community - 1495741&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 07:48:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-creating-a-master-calendar-with-equal-month-or-periods/m-p/2037511#M85479</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2023-02-14T07:48:02Z</dc:date>
    </item>
  </channel>
</rss>

