<?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 Help on Calender! in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-on-Calender/m-p/176056#M44207</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Blaise!&lt;/P&gt;&lt;P&gt;Let me know how it can be used! I don't have the master calender in my script. That's the reason i have posted it here. Let me know what how can i create the same.&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Rikab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Mar 2010 12:44:59 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-03-11T12:44:59Z</dc:date>
    <item>
      <title>Help on Calender!</title>
      <link>https://community.qlik.com/t5/QlikView/Help-on-Calender/m-p/176052#M44203</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;I want to create generalized calender table from where all the date fields can be accessed. Below i have given the script which i am using to load the sales data which contains the date field also. I want to create the generalized calender table using the date field which is available in the sales data.&lt;/P&gt;&lt;P&gt;I prefer something like the below one. But i don't want synthetic keys to be created. Any suggestions please!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;Calendar:&lt;BR /&gt;Load&lt;BR /&gt; *,&lt;BR /&gt; Day(DATE) as Day,&lt;BR /&gt; DayName(DATE) as [Day Name],&lt;BR /&gt; WeekDay(DATE) as [Day of Week],&lt;BR /&gt; WeekName(DATE) as [Week Name],&lt;BR /&gt; LunarWeekName(DATE) as [Lunar Week Name],&lt;BR /&gt; Month(DATE) as [Month],&lt;BR /&gt; MonthName(DATE) as [Month Name],&lt;BR /&gt; QuarterName(DATE) as [Quarter Name],&lt;BR /&gt; Year(DATE) as [Year]&lt;BR /&gt; ;&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;// Sales data script&lt;BR /&gt;Sales:&lt;BR /&gt;ODBC CONNECT TO [1];&lt;BR /&gt;SQL SELECT AREA,&lt;BR /&gt; BRAND,&lt;BR /&gt; `COMP_`,&lt;BR /&gt; DATE,&lt;BR /&gt; FORMU as FORMULATION,&lt;BR /&gt; month(DATE) AS MONTH,&lt;BR /&gt; YEAR(FYEAR) AS YEAR,&lt;BR /&gt; `HQ_DESC`,&lt;BR /&gt; ORG,&lt;BR /&gt; PACKING,&lt;BR /&gt; `PRD_CD`,&lt;BR /&gt; `PRD_DESC`,&lt;BR /&gt; REGION,&lt;BR /&gt; SBU,&lt;BR /&gt; SQTY,&lt;BR /&gt; SVAL,&lt;BR /&gt; TQTY,&lt;BR /&gt; TVAL,&lt;BR /&gt; TYPE,&lt;BR /&gt; ZONE&lt;BR /&gt;FROM `E:\QlikView\Application\Data`\new3;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Rikab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 05:39:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-on-Calender/m-p/176052#M44203</guid>
      <dc:creator />
      <dc:date>2010-03-11T05:39:08Z</dc:date>
    </item>
    <item>
      <title>Help on Calender!</title>
      <link>https://community.qlik.com/t5/QlikView/Help-on-Calender/m-p/176053#M44204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Rikab,&lt;/P&gt;&lt;P&gt;The key field for what you are trying to achieve is "DATE", so create that field in Master Calendar, and prefix all Calendar fields with "Calendar", for example, so your main table "Sales" will be linked to the calendar through the "DATE" field. Then, you only have to use Calendar fields as dimensions or in expressions to get the values you want to display.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 08:45:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-on-Calender/m-p/176053#M44204</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-03-11T08:45:00Z</dc:date>
    </item>
    <item>
      <title>Help on Calender!</title>
      <link>https://community.qlik.com/t5/QlikView/Help-on-Calender/m-p/176054#M44205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No need to make month(DATE) and year(FYEAR) in your sales table if you use a master calendar. This is the whole point in using a master calendar (ie not making your month() etc in your master data).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 10:50:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-on-Calender/m-p/176054#M44205</guid>
      <dc:creator>blaise</dc:creator>
      <dc:date>2010-03-11T10:50:20Z</dc:date>
    </item>
    <item>
      <title>Help on Calender!</title>
      <link>https://community.qlik.com/t5/QlikView/Help-on-Calender/m-p/176055#M44206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not create your master calendar in an xls with all the additional fields (quarters etc)?&lt;/P&gt;&lt;P&gt;Apart from being a true 'master' it saves having the code in every document and so reduces load, and also means you can use just those elements the individual document needs / add new ones more conveniently.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 11:18:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-on-Calender/m-p/176055#M44206</guid>
      <dc:creator />
      <dc:date>2010-03-11T11:18:52Z</dc:date>
    </item>
    <item>
      <title>Help on Calender!</title>
      <link>https://community.qlik.com/t5/QlikView/Help-on-Calender/m-p/176056#M44207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Blaise!&lt;/P&gt;&lt;P&gt;Let me know how it can be used! I don't have the master calender in my script. That's the reason i have posted it here. Let me know what how can i create the same.&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Rikab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 12:44:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-on-Calender/m-p/176056#M44207</guid>
      <dc:creator />
      <dc:date>2010-03-11T12:44:59Z</dc:date>
    </item>
    <item>
      <title>Help on Calender!</title>
      <link>https://community.qlik.com/t5/QlikView/Help-on-Calender/m-p/176057#M44208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gordan!&lt;/P&gt;&lt;P&gt;Thanks for your suggestion! Can you create the xls sheet once which can link with the sales table without creating the synthetic keys.&lt;/P&gt;&lt;P&gt;Waiting for your reply!&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Rikab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 12:48:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-on-Calender/m-p/176057#M44208</guid>
      <dc:creator />
      <dc:date>2010-03-11T12:48:18Z</dc:date>
    </item>
    <item>
      <title>Help on Calender!</title>
      <link>https://community.qlik.com/t5/QlikView/Help-on-Calender/m-p/176058#M44209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel!&lt;/P&gt;&lt;P&gt;I am not getting your point. Can you please do the required changes in my script. Will be thankful to you!&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rikab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 12:52:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-on-Calender/m-p/176058#M44209</guid>
      <dc:creator />
      <dc:date>2010-03-11T12:52:59Z</dc:date>
    </item>
    <item>
      <title>Help on Calender!</title>
      <link>https://community.qlik.com/t5/QlikView/Help-on-Calender/m-p/176059#M44210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following code creates a calendar for this year. Adjust theStartDate and EndDate variables to match your application. There a quite a few ways to make a calendar table, so see this just as an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt; Let vDateStart = num(date(yearstart(today()),'YYYY-MM-DD'));&lt;BR /&gt;Let vDateStop = num(date(yearend(today()),'YYYY-MM-DD'));&lt;BR /&gt;Dates:&lt;BR /&gt;LOAD&lt;BR /&gt; Date($(vDateStart)+(Iterno()-1),'YYYY-MM-DD') as Date&lt;BR /&gt;autogenerate 1&lt;BR /&gt; While Date($(vDateStart)+(Iterno()-1)) &amp;lt;=Date($(vDateStop));&lt;BR /&gt;&lt;BR /&gt;Calendar:&lt;BR /&gt;LOAD&lt;BR /&gt; date(Date,'YYYY-MM-DD') as Date,&lt;BR /&gt; year(Date) as Year,&lt;BR /&gt; month(Date) as Month,&lt;BR /&gt; week(Date) as Week,&lt;BR /&gt; day(Date) as Day,&lt;BR /&gt; weekday(Date) as Weekday,&lt;BR /&gt; num(weekday(Date)) as WeekdayNum,&lt;BR /&gt; right(year(Date),2) &amp;amp;'-'&amp;amp; month(Date) as YearMonth&lt;BR /&gt;RESIDENT Dates;&lt;BR /&gt;DROP TABLE Dates;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 13:22:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-on-Calender/m-p/176059#M44210</guid>
      <dc:creator>blaise</dc:creator>
      <dc:date>2010-03-11T13:22:00Z</dc:date>
    </item>
    <item>
      <title>Help on Calender!</title>
      <link>https://community.qlik.com/t5/QlikView/Help-on-Calender/m-p/176060#M44211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Blaise!&lt;/P&gt;&lt;P&gt;Thank you! I will try you method and let you know the outcome.&lt;/P&gt;&lt;P&gt;Anybody else having any other method. If yes please post it here.&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Rikab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Mar 2010 05:29:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-on-Calender/m-p/176060#M44211</guid>
      <dc:creator />
      <dc:date>2010-03-12T05:29:15Z</dc:date>
    </item>
    <item>
      <title>Help on Calender!</title>
      <link>https://community.qlik.com/t5/QlikView/Help-on-Calender/m-p/176061#M44212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, dsjain,&lt;/P&gt;&lt;P&gt;It is also possible not to create Master Calendar using Autogenerate. You can use already existing dates in your Sales table.&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;t1:&lt;BR /&gt;Load Distinct DATE&lt;BR /&gt;Resident Sales;&lt;BR /&gt;&lt;BR /&gt;Calendar:&lt;BR /&gt; DATE,&lt;BR /&gt; Year(DATE) as Year,&lt;BR /&gt; Month(DATE) as Month,&lt;BR /&gt; Week(DATE) as Week,&lt;BR /&gt; ........&lt;BR /&gt;Resident t1;&lt;BR /&gt;&lt;BR /&gt;Drop Table t1;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Miguel and blaise are right by saing, that in each table, linked to Master Calendar you need only one key field. mainly this field is Date.&lt;BR /&gt;By doing so, you can add several tables to Calendar with one Date field.&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/5001.Calendar.png"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/5001.Calendar.png" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In case with several tables you need to be sure, that master calendar contains all unique dates from all connedted tables. Then you will need several Distinct loads:&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;t1:&lt;BR /&gt;Load Distinct DATE&lt;BR /&gt;Resident Sales;&lt;BR /&gt;&lt;BR /&gt;Concatenate (t1) Load Distinct DATE&lt;BR /&gt;Resident Table2;&lt;BR /&gt;&lt;BR /&gt;Concatenate (t1) Load Distinct DATE&lt;BR /&gt;Resident Table3;&lt;BR /&gt;&lt;BR /&gt;........&lt;BR /&gt;&lt;BR /&gt;t2:&lt;BR /&gt;Noconcatenate Load Distinct DATE&lt;BR /&gt;Resident t1;&lt;BR /&gt;&lt;BR /&gt;Drop Table t1;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;You can also use another DATE field in master calendar (e.g. DATE2) if there is a need to separate those dates.&lt;/P&gt;&lt;P&gt;That's the way I do it &lt;IMG alt="Wink" src="http://community.qlik.com/emoticons/emotion-5.gif" /&gt;&lt;BR /&gt;Good luck!&lt;/P&gt;&lt;P&gt;Rgs,&lt;BR /&gt;AT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Mar 2010 10:15:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-on-Calender/m-p/176061#M44212</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-03-12T10:15:48Z</dc:date>
    </item>
    <item>
      <title>Help on Calender!</title>
      <link>https://community.qlik.com/t5/QlikView/Help-on-Calender/m-p/176062#M44213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The big disadvantage with not using the autogenerate function is longer load time. By doing a load distinct Date resident Sales, and after that a resident load again you end up with a master calendar that takes a lot more time to create than the autogenerate.&lt;/P&gt;&lt;P&gt;The only disadvantage i see with using a autogenerated master calendar is that you probably add dates with no relevant "sales" data. But this can be solved doing a left keep or where exists when loading the autogenerated master calendar. Also this small disadvantage can turn into an advantage when you dont need to answer questions from the users like "what the heck has happened to January the 3rd in 2009"...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Mar 2010 12:14:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-on-Calender/m-p/176062#M44213</guid>
      <dc:creator>blaise</dc:creator>
      <dc:date>2010-03-12T12:14:27Z</dc:date>
    </item>
    <item>
      <title>Help on Calender!</title>
      <link>https://community.qlik.com/t5/QlikView/Help-on-Calender/m-p/176063#M44214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi AT!&lt;/P&gt;&lt;P&gt;Thanks your effort. I think i have got the result which i am looking for.In this i want to get the financial year also let me know how can i get it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Calender:&lt;BR /&gt; Load&lt;BR /&gt; DATE,&lt;BR /&gt; Day(DATE) as Day,&lt;BR /&gt; DayName(DATE) as [Day Name],&lt;BR /&gt; WeekDay(DATE) as [Day of Week],&lt;BR /&gt; WeekName(DATE) as [Week Name],&lt;BR /&gt; LunarWeekName(DATE) as [Lunar Week Name],&lt;BR /&gt; Month(DATE) as [Month],&lt;BR /&gt; MonthName(DATE) as [Month Name],&lt;BR /&gt; QuarterName(DATE) as [Quarter Name],&lt;BR /&gt; Year(DATE) as [Year]&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Rikab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Mar 2010 07:40:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-on-Calender/m-p/176063#M44214</guid>
      <dc:creator />
      <dc:date>2010-03-13T07:40:04Z</dc:date>
    </item>
  </channel>
</rss>

