<?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 Calendar Help? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calendar-Help/m-p/310784#M114765</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks for your response Toni I will give it a try. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Nov 2011 17:51:16 GMT</pubDate>
    <dc:creator>stuwannop</dc:creator>
    <dc:date>2011-11-23T17:51:16Z</dc:date>
    <item>
      <title>Calendar Help?</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Help/m-p/310779#M114760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I have two calendar scripts linking to two different date fields in an excel table (both are identically formatted). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although the scripts run fine, one of the calendars won't pick up the date field correctly (i.e. When I filter the calendar (e.g. Clicking June) no data appears, although it shows in a straight table). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is my script for the second calendar: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Range:&lt;BR /&gt;LOAD&lt;BR /&gt; min(EDate) as startdate,&lt;BR /&gt; max(EDate) as enddate&lt;BR /&gt;resident [Group Opps];&lt;/P&gt;&lt;P&gt;//Peek out the values for later use&lt;BR /&gt;let vStart = peek('startdate',-1,'Range')-1;&lt;BR /&gt;let vEnd = peek('enddate',-1,'Range');&lt;BR /&gt;let vRange = $(vEnd) - $(vStart);&lt;/P&gt;&lt;P&gt;//Remove Range table as no longer needed&lt;BR /&gt;Drop table Range;&lt;/P&gt;&lt;P&gt;//Generate a table with a row per date between the range above&lt;BR /&gt;Date:&lt;BR /&gt;Load&lt;BR /&gt; $(vStart)+recno() as EDate&lt;BR /&gt;autogenerate $(vRange);&lt;/P&gt;&lt;P&gt;//Calculate the Parts you need to examine&lt;BR /&gt;EstCalendar:&lt;BR /&gt;load&lt;BR /&gt; EDate as EDate,&lt;BR /&gt;// date(Date,'dd/mm/yyyy') as Cal_FullDate,&lt;BR /&gt; Year(EDate) as EstCalendarYear,&lt;BR /&gt; 'Q'&amp;amp;ceil(Month(EDate)/3) AS EstCal_Quarter,&lt;BR /&gt;// right(yearname(Date,0,$(vFiscalMonthStart)),4) as Cal_FiscalYear,&lt;BR /&gt;// if(InYear (Date, $(vToday), -1),1) as Cal_FULL_LY, // All Dates Last Year&lt;BR /&gt;// if(InYear (Date, $(vToday), 0),1) as Cal_FULL_TY, // All Dates This Year&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(InYearToDate (EDate, today(), 0),1,0) as EstCal_YTD_TY,&amp;nbsp; // All Dates to Date this Year&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(InYearToDate (EDate, today(), -1),1,0) as EstCal_YTD_LY,&amp;nbsp; // All Dates to Date Last Year&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(InQuarterToDate (EDate, today(), 0),1,0) as EstCal_QTR_TQ,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(InQuarterToDate (EDate, today(), -1),1,0) as EstCal_QTR_LQ,&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(InMonthToDate(EDate, today(), 0),1,0) as EstCal_MNTH_TM,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(InMonthToDate(EDate, today(), -1),1,0) as EstCal_MNTH_LM,&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;//&amp;nbsp; YTD_LY, used in Expressions Ex. Sum(Sales*YTD_LY)&lt;BR /&gt; quartername(EDate) as EstCal_CalendarQuarter,&lt;BR /&gt;// quartername(Date,0,$(vFiscalMonthStart)) as Cal_FiscalQuarter,&lt;BR /&gt;// Month(Date)&amp;amp;'-'&amp;amp;right(yearname(Date,0,11),4) as Cal_FiscalMonthYear, //Fiscal!&lt;BR /&gt; Month(EDate)&amp;amp;'-'&amp;amp;right(year(EDate),4) as EstCal_MonthYear,&lt;BR /&gt; Month(EDate) as EstCal_Month,&lt;BR /&gt; Day(EDate) as EstCal_Day,&lt;BR /&gt; Week(EDate) as EstCal_Week,&lt;BR /&gt; Weekday(EDate) as EstCal_WeekDay&lt;BR /&gt;resident Date;&lt;/P&gt;&lt;P&gt;//Tidy up&lt;BR /&gt;Drop table Date;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like I say, script loads fine, dates are displayed in a straight table if I check that and I don't see any reason why I can't run 2 calendars. Could it be something simple like a data format issue - if so how could I correct it? I've checked the excel sheet and it's formatted as a date. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas anyone?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Stu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2011 10:44:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Help/m-p/310779#M114760</guid>
      <dc:creator>stuwannop</dc:creator>
      <dc:date>2011-07-27T10:44:44Z</dc:date>
    </item>
    <item>
      <title>Calendar Help?</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Help/m-p/310780#M114761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stu,&lt;/P&gt;&lt;P&gt;take a look at your linking field(s). I suppose it is Date.EDate and let's say OrgDate.EDate. Then check out if both formats fit together. Your&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;Load&lt;BR /&gt; $(vStart)+recno() as EDate&lt;BR /&gt;autogenerate $(vRange);&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;generates a &lt;EM&gt;numeric field&lt;/EM&gt;. May be a formatting for this like Date(&lt;CODE class="jive-code"&gt;$(vStart)+recno()&lt;/CODE&gt;) could help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nevertheless I am not happy when linking tables using date-fields. I prefer creating surrogato-keyfields (one per table) with functions like Autonumber(EDate,1) AS $Date_ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HtH&lt;/P&gt;&lt;P&gt;Roland&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2011 13:46:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Help/m-p/310780#M114761</guid>
      <dc:creator />
      <dc:date>2011-07-27T13:46:41Z</dc:date>
    </item>
    <item>
      <title>Calendar Help?</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Help/m-p/310781#M114762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks for your reply Roland I'll give that a try. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2011 16:38:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Help/m-p/310781#M114762</guid>
      <dc:creator>stuwannop</dc:creator>
      <dc:date>2011-11-22T16:38:04Z</dc:date>
    </item>
    <item>
      <title>Calendar Help?</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Help/m-p/310782#M114763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Roland&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I gave it a go (changing the formats to match) but it didn't work - worth a try though. The problem I think is the dates in my source data are appointments, which of course have different times. The script runs but creates about 361,000 calendar values! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm quite new to qlikview so I'm still on the the hunt for an answer - any idea how I could modify my script? Essentially I need to be able to create a list box where you can select month/year and only show (or sum)appointments in a specified period. I've been on a couple of QV courses but I don't think I covered surrogate fields - they actually teach you the calendar script though. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Stu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2011 17:01:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Help/m-p/310782#M114763</guid>
      <dc:creator>stuwannop</dc:creator>
      <dc:date>2011-11-22T17:01:53Z</dc:date>
    </item>
    <item>
      <title>Calendar Help?</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Help/m-p/310783#M114764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you checked that your date field is an integer and not a decimal value? If the date's numeric value has a decimal part then it will not match a date. If this is the case then you can easily get around it by applying Floor() to your date value to remove the decimal part.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2011 21:12:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Help/m-p/310783#M114764</guid>
      <dc:creator>ToniKautto</dc:creator>
      <dc:date>2011-11-22T21:12:04Z</dc:date>
    </item>
    <item>
      <title>Calendar Help?</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Help/m-p/310784#M114765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks for your response Toni I will give it a try. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Nov 2011 17:51:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Help/m-p/310784#M114765</guid>
      <dc:creator>stuwannop</dc:creator>
      <dc:date>2011-11-23T17:51:16Z</dc:date>
    </item>
  </channel>
</rss>

