<?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 Custom date periods in comparison in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Custom-date-periods-in-comparison/m-p/472013#M560668</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, Community!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The task is the following. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have calendar in our model based on this example script:&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 _jivemacro_uid_1366382741567765" jivemacro_uid="_1366382741567765"&gt;&lt;P&gt;LET varMinDate = Num(Peek('DG_TURDATE', 0, 'Calendar_Tur'));&lt;/P&gt;&lt;P&gt;LET varMaxDate = Num(Peek('DG_TURDATE', -1, 'Calendar_Tur'));&lt;/P&gt;&lt;P&gt;LET varToday = num(today());&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;//*************** Temporary Calendar ***************&lt;/P&gt;&lt;P&gt;DateField:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; $(varMinDate) + rowno() - 1 AS Num, &lt;/P&gt;&lt;P&gt;&amp;nbsp; date($(varMinDate) + rowno() - 1) AS TempDate &lt;/P&gt;&lt;P&gt;AUTOGENERATE &lt;/P&gt;&lt;P&gt;&amp;nbsp; $(varMaxDate) - $(varMinDate) + 1; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//*************** Master Calendar ***************&lt;/P&gt;&lt;P&gt;Calendar_Tur_Period:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TempDate AS DG_TURDATE,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Year(TempDate) AS YearTourPeriod,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(TempDate) AS MonthTourPeriod,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Day(TempDate) AS DayTourPeriod,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Week(TempDate) AS WeekTourPeriod,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WeekDay(TempDate) AS WeekDayTourPeriod,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MonthName (TempDate) as MonthYearTourPeriod,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Quarter ' &amp;amp; ceil(Month(TempDate)/3) AS QuarterTourPeriod&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;&lt;/P&gt;&lt;P&gt;RESIDENT DateField &lt;/P&gt;&lt;P&gt;ORDER BY TempDate ASC;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE DateField;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Though the variables I add the functionality that the user is able to first select the Start Date and then EndDate and select this period pressing the Button with action. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So QlikView selects for him only those values that are connected with this selected period, f.e. 10 January 2013 to 17 January 2013 and he is analysing the data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is the following, how can we create this user path:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) User selects Start Date (f.e. 12 January), selects End Date (19 January), and then selects several years (f.e. 2013, 2012, 2011, 2010), and QlikView selects to him only the values in period of 12 January to 19 January in each year 2013, 2012, 2011....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) User for example selects 25 December 2012 as Start Date and then selects 10 January 2013 as End Date, there in addition he selects years 2013, 2012, 2011, 2010. And QlikView should select for him only those values that are connected to appropriate period:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25 December 2012 to 10 January 2013 &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25 December 2011 to 10 January 2012&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25 December 2010 to 10 January 2011&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And so on. So&amp;nbsp; the system should count the values only connected to this data set of date&amp;nbsp; periods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What the main ways I should look through to solve this issue as user estimates the experience as I described above?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Apr 2013 14:59:06 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-04-19T14:59:06Z</dc:date>
    <item>
      <title>Custom date periods in comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-date-periods-in-comparison/m-p/472013#M560668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, Community!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The task is the following. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have calendar in our model based on this example script:&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 _jivemacro_uid_1366382741567765" jivemacro_uid="_1366382741567765"&gt;&lt;P&gt;LET varMinDate = Num(Peek('DG_TURDATE', 0, 'Calendar_Tur'));&lt;/P&gt;&lt;P&gt;LET varMaxDate = Num(Peek('DG_TURDATE', -1, 'Calendar_Tur'));&lt;/P&gt;&lt;P&gt;LET varToday = num(today());&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;//*************** Temporary Calendar ***************&lt;/P&gt;&lt;P&gt;DateField:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; $(varMinDate) + rowno() - 1 AS Num, &lt;/P&gt;&lt;P&gt;&amp;nbsp; date($(varMinDate) + rowno() - 1) AS TempDate &lt;/P&gt;&lt;P&gt;AUTOGENERATE &lt;/P&gt;&lt;P&gt;&amp;nbsp; $(varMaxDate) - $(varMinDate) + 1; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//*************** Master Calendar ***************&lt;/P&gt;&lt;P&gt;Calendar_Tur_Period:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TempDate AS DG_TURDATE,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Year(TempDate) AS YearTourPeriod,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(TempDate) AS MonthTourPeriod,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Day(TempDate) AS DayTourPeriod,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Week(TempDate) AS WeekTourPeriod,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WeekDay(TempDate) AS WeekDayTourPeriod,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MonthName (TempDate) as MonthYearTourPeriod,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Quarter ' &amp;amp; ceil(Month(TempDate)/3) AS QuarterTourPeriod&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;&lt;/P&gt;&lt;P&gt;RESIDENT DateField &lt;/P&gt;&lt;P&gt;ORDER BY TempDate ASC;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE DateField;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Though the variables I add the functionality that the user is able to first select the Start Date and then EndDate and select this period pressing the Button with action. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So QlikView selects for him only those values that are connected with this selected period, f.e. 10 January 2013 to 17 January 2013 and he is analysing the data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is the following, how can we create this user path:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) User selects Start Date (f.e. 12 January), selects End Date (19 January), and then selects several years (f.e. 2013, 2012, 2011, 2010), and QlikView selects to him only the values in period of 12 January to 19 January in each year 2013, 2012, 2011....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) User for example selects 25 December 2012 as Start Date and then selects 10 January 2013 as End Date, there in addition he selects years 2013, 2012, 2011, 2010. And QlikView should select for him only those values that are connected to appropriate period:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25 December 2012 to 10 January 2013 &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25 December 2011 to 10 January 2012&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25 December 2010 to 10 January 2011&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And so on. So&amp;nbsp; the system should count the values only connected to this data set of date&amp;nbsp; periods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What the main ways I should look through to solve this issue as user estimates the experience as I described above?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Apr 2013 14:59:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-date-periods-in-comparison/m-p/472013#M560668</guid>
      <dc:creator />
      <dc:date>2013-04-19T14:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Custom date periods in comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-date-periods-in-comparison/m-p/472014#M560669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; What i feel why do you allow the&amp;nbsp; Option as Year , Month try to have ListBox for Days and then&lt;/P&gt;&lt;P&gt;Month Year Period like 'MM-YYYY' or 'MMM-YY' so that the user can select the Period (i.e Dec-2012) and the days .&lt;/P&gt;&lt;P&gt;If i am not to the point please correct me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;///Yusuf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Apr 2013 18:52:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-date-periods-in-comparison/m-p/472014#M560669</guid>
      <dc:creator />
      <dc:date>2013-04-19T18:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: Custom date periods in comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-date-periods-in-comparison/m-p/472015#M560670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No, this will get no result, i.e. he could select the days in list box, but it only returnes the values for that months. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, when he selects December days of 2012 and January days of 2013, without Year connection, QlikView selects all values in Decembers and Januaries, i.e. it will sum the values for january 2010 and dec 2010, then january 2011 and dec 2011 and so on. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As what we look, is that when he selects december 25 to january 10, QlikView recognizes it as a &lt;SPAN style="color: #231f20; font-family: Arial, Verdana, Geneva, sans-serif; font-size: 12px; font-weight: bold; background-color: #ffffff;"&gt;discrete&lt;/SPAN&gt; period, and then user should be able to select the years in which he will look for activity only in those &lt;SPAN style="color: #231f20; font-family: Arial, Verdana, Geneva, sans-serif; font-size: 12px; font-weight: bold; background-color: #ffffff;"&gt;discrete&lt;/SPAN&gt; periods. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question is, how can I teach QlikView ti recognize it as period?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Apr 2013 17:15:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-date-periods-in-comparison/m-p/472015#M560670</guid>
      <dc:creator />
      <dc:date>2013-04-21T17:15:28Z</dc:date>
    </item>
  </channel>
</rss>

