<?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: Master Calendar without weekends and hollidays in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Master-Calendar-without-weekends-and-hollidays/m-p/565920#M686042</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;maybe I am doing something wrong but I did add that WHERE clouse... though it is still loads me the weekends. I need to get rid of those when I use Date. and then lets say i choose year and then month..&amp;nbsp; but then I only need to se the working dates... withouth weeknds&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;here is my edited script with the where clouse&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*************** MinMax Table *************&lt;/P&gt;&lt;P&gt;Keeps minimum and maximum Date value from Facts table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MinMax:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; Min(Date) as MinDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Max(Date) as MaxDate&lt;/P&gt;&lt;P&gt;RESIDENT MainTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vMinDate = Num(Peek('MinDate', 0, 'MinMax')); &lt;/P&gt;&lt;P&gt;LET vMaxDate = Num(Peek('MaxDate', 0, 'MinMax')); &lt;/P&gt;&lt;P&gt;LET vToday = $(vMaxDate);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*************** Temporary Calendar *************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generates a single table with one field containing &lt;/P&gt;&lt;P&gt;all existing dates between MinDate and MaxDate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TempCal:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; date($(vMinDate) + rowno() - 1) AS TempDate &lt;/P&gt;&lt;P&gt;AUTOGENERATE &lt;/P&gt;&lt;P&gt;&amp;nbsp; $(vMaxDate) - $(vMinDate) + 1; &lt;/P&gt;&lt;P&gt;DROP TABLE MinMax;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*************** Master Calendar ***************&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MasterCalendar:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; TempDate AS Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Week(TempDate) AS Week,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Year(TempDate) AS Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Month(TempDate) AS Month,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Day(TempDate) AS Day,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Weekday(TempDate) AS WeekDay,&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'Q' &amp;amp; ceil(month(TempDate) / 3) AS Quarter,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Date(monthstart(TempDate), 'MMM-YYYY') AS MonthYear,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Week(TempDate)&amp;amp;'-'&amp;amp;Year(TempDate) AS WeekYear,&lt;/P&gt;&lt;P&gt;&amp;nbsp; inyeartodate(TempDate, $(vToday), 0) * -1 AS CurYTDFlag,&lt;/P&gt;&lt;P&gt;&amp;nbsp; inyeartodate(TempDate, $(vToday), -1) * -1 AS LastYTDFlag &lt;/P&gt;&lt;P&gt;RESIDENT TempCal&lt;/P&gt;&lt;P&gt;Where Weekday(TempDate) &amp;lt; 5&lt;/P&gt;&lt;P&gt;ORDER BY TempDate ASC;&lt;/P&gt;&lt;P&gt;DROP TABLE TempCal;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Jan 2014 14:45:27 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-01-24T14:45:27Z</dc:date>
    <item>
      <title>Master Calendar without weekends and hollidays</title>
      <link>https://community.qlik.com/t5/QlikView/Master-Calendar-without-weekends-and-hollidays/m-p/565917#M686039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to be able to show Dates exluding weekends and hollidays. Is there a simple way to do it? &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Thanks in advance for your help. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a script for my calender that I use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*************** MinMax Table *************&lt;/P&gt;&lt;P&gt;Keeps minimum and maximum Date value from Facts table&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MinMax:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; Min(Date) as MinDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Max(Date) as MaxDate&lt;/P&gt;&lt;P&gt;RESIDENT MainTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vMinDate = Num(Peek('MinDate', 0, 'MinMax')); &lt;/P&gt;&lt;P&gt;LET vMaxDate = Num(Peek('MaxDate', 0, 'MinMax')); &lt;/P&gt;&lt;P&gt;LET vToday = $(vMaxDate);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*************** Temporary Calendar *************&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Generates a single table with one field containing &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;all existing dates between MinDate and MaxDate.&lt;/P&gt;&lt;P&gt;&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;TempCal:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; date($(vMinDate) + rowno() - 1) AS TempDate &lt;/P&gt;&lt;P&gt;AUTOGENERATE &lt;/P&gt;&lt;P&gt;&amp;nbsp; $(vMaxDate) - $(vMinDate) + 1; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;DROP TABLE MinMax;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*************** Master Calendar ***************&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MasterCalendar:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; TempDate AS Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Week(TempDate) AS Week,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Year(TempDate) AS Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Month(TempDate) AS Month,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Day(TempDate) AS Day,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Weekday(TempDate) AS WeekDay,&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'Q' &amp;amp; ceil(month(TempDate) / 3) AS Quarter,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Date(monthstart(TempDate), 'MMM-YYYY') AS MonthYear,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Week(TempDate)&amp;amp;'-'&amp;amp;Year(TempDate) AS WeekYear,&lt;/P&gt;&lt;P&gt;&amp;nbsp; inyeartodate(TempDate, $(vToday), 0) * -1 AS CurYTDFlag,&lt;/P&gt;&lt;P&gt;&amp;nbsp; inyeartodate(TempDate, $(vToday), -1) * -1 AS LastYTDFlag &lt;/P&gt;&lt;P&gt;RESIDENT TempCal &lt;/P&gt;&lt;P&gt;ORDER BY TempDate ASC;&lt;/P&gt;&lt;P&gt;DROP TABLE TempCal;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2014 14:13:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Master-Calendar-without-weekends-and-hollidays/m-p/565917#M686039</guid>
      <dc:creator />
      <dc:date>2014-01-24T14:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: Master Calendar without weekends and hollidays</title>
      <link>https://community.qlik.com/t5/QlikView/Master-Calendar-without-weekends-and-hollidays/m-p/565918#M686040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Weekends could be removed per where weekday(TempDate) &amp;lt; 5. Holidays should be loaded in a mapping-table before you generated your calendar and then where applymap('HolidayTable', TempDate, 'not found') &amp;lt;&amp;gt; 'not found'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where weekday(TempDate) &amp;lt; 5 and applymap('HolidayTable', TempDate, 'not found') &amp;lt;&amp;gt; 'not found'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2014 14:22:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Master-Calendar-without-weekends-and-hollidays/m-p/565918#M686040</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-01-24T14:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: Master Calendar without weekends and hollidays</title>
      <link>https://community.qlik.com/t5/QlikView/Master-Calendar-without-weekends-and-hollidays/m-p/565919#M686041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Roman,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From your script, where you have excluded weekends and holidays?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to use If condition to check the date is weekend or not and store the value in a filed called WeekendFlag (having 1 &amp;amp; 0).&lt;/P&gt;&lt;P&gt;Ex: If(Date = Weekend(Date),1,0) as WeekendFlag.&lt;/P&gt;&lt;P&gt;Try to use Lookup for checking holidays and use another flag.&lt;/P&gt;&lt;P&gt;Load the same table by eliminationg the corespoing flags WeekendFlag and HolidayFlag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2014 14:25:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Master-Calendar-without-weekends-and-hollidays/m-p/565919#M686041</guid>
      <dc:creator />
      <dc:date>2014-01-24T14:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Master Calendar without weekends and hollidays</title>
      <link>https://community.qlik.com/t5/QlikView/Master-Calendar-without-weekends-and-hollidays/m-p/565920#M686042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;maybe I am doing something wrong but I did add that WHERE clouse... though it is still loads me the weekends. I need to get rid of those when I use Date. and then lets say i choose year and then month..&amp;nbsp; but then I only need to se the working dates... withouth weeknds&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;here is my edited script with the where clouse&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*************** MinMax Table *************&lt;/P&gt;&lt;P&gt;Keeps minimum and maximum Date value from Facts table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MinMax:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; Min(Date) as MinDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Max(Date) as MaxDate&lt;/P&gt;&lt;P&gt;RESIDENT MainTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vMinDate = Num(Peek('MinDate', 0, 'MinMax')); &lt;/P&gt;&lt;P&gt;LET vMaxDate = Num(Peek('MaxDate', 0, 'MinMax')); &lt;/P&gt;&lt;P&gt;LET vToday = $(vMaxDate);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*************** Temporary Calendar *************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generates a single table with one field containing &lt;/P&gt;&lt;P&gt;all existing dates between MinDate and MaxDate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TempCal:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; date($(vMinDate) + rowno() - 1) AS TempDate &lt;/P&gt;&lt;P&gt;AUTOGENERATE &lt;/P&gt;&lt;P&gt;&amp;nbsp; $(vMaxDate) - $(vMinDate) + 1; &lt;/P&gt;&lt;P&gt;DROP TABLE MinMax;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*************** Master Calendar ***************&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MasterCalendar:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; TempDate AS Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Week(TempDate) AS Week,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Year(TempDate) AS Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Month(TempDate) AS Month,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Day(TempDate) AS Day,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Weekday(TempDate) AS WeekDay,&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'Q' &amp;amp; ceil(month(TempDate) / 3) AS Quarter,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Date(monthstart(TempDate), 'MMM-YYYY') AS MonthYear,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Week(TempDate)&amp;amp;'-'&amp;amp;Year(TempDate) AS WeekYear,&lt;/P&gt;&lt;P&gt;&amp;nbsp; inyeartodate(TempDate, $(vToday), 0) * -1 AS CurYTDFlag,&lt;/P&gt;&lt;P&gt;&amp;nbsp; inyeartodate(TempDate, $(vToday), -1) * -1 AS LastYTDFlag &lt;/P&gt;&lt;P&gt;RESIDENT TempCal&lt;/P&gt;&lt;P&gt;Where Weekday(TempDate) &amp;lt; 5&lt;/P&gt;&lt;P&gt;ORDER BY TempDate ASC;&lt;/P&gt;&lt;P&gt;DROP TABLE TempCal;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2014 14:45:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Master-Calendar-without-weekends-and-hollidays/m-p/565920#M686042</guid>
      <dc:creator />
      <dc:date>2014-01-24T14:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: Master Calendar without weekends and hollidays</title>
      <link>https://community.qlik.com/t5/QlikView/Master-Calendar-without-weekends-and-hollidays/m-p/565921#M686043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For me it worked - are you sure that you always have weekends?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2014 16:15:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Master-Calendar-without-weekends-and-hollidays/m-p/565921#M686043</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-01-24T16:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Master Calendar without weekends and hollidays</title>
      <link>https://community.qlik.com/t5/QlikView/Master-Calendar-without-weekends-and-hollidays/m-p/565922#M686044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;YES! actually it does work. Thank you! The reason why it was still showing me all the days was because I had (under the axes) Continious checked in the chart option!!!&amp;nbsp; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2014 16:36:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Master-Calendar-without-weekends-and-hollidays/m-p/565922#M686044</guid>
      <dc:creator />
      <dc:date>2014-01-24T16:36:47Z</dc:date>
    </item>
  </channel>
</rss>

