<?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: need help in understanding some fields from calendar in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/need-help-in-understanding-some-fields-from-calendar/m-p/792415#M280129</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the following three examples:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;YearToDate('1998-11-10', 0,1,'1998-11-18')&amp;nbsp; will result in -1 (true)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is true as the date 1998-11-10 can be found between 1998-01-01 and 1998-11-18&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;YearToDate('1998-11-10', -1,1,'1998-11-18') will result in 0 (false)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is false as the date 1998-11-10 cannot be found between 1997-01-01 and 1997-11-18&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;YearToDate('1997-11-10', -1,1,'1998-11-18') will result in -1 (true)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is true as the date 1997-11-10 can be found &lt;SPAN style="font-size: 13.6000003814697px;"&gt;between 1997-01-01 and 1997-11-18. Do notice that we have offset the years with -1 (year).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first date parameter is the one you compare to the date range. The second (last) date parameter can either be set manually, as in the example above, or will default to the last reload date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Niklas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Dec 2014 12:37:58 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-12-08T12:37:58Z</dc:date>
    <item>
      <title>need help in understanding some fields from calendar</title>
      <link>https://community.qlik.com/t5/QlikView/need-help-in-understanding-some-fields-from-calendar/m-p/792409#M280123</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;Can anybody explain me these two fields&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; YeartoDate(TempDate)*-1 as CurYTDFlag, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; YeartoDate(TempDate,-1)*-1 as LastYTDFlag&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year2Date(TempDate, 0, 1, $(vToday))*-1 AS CurYTDFlag,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year2Date(TempDate,-1, 1, $(vToday))*-1 AS LastYTDFlag,&lt;/P&gt;&lt;P&gt;why are we doing -1 in this fields and how can i use these two fields in my application.&lt;/P&gt;&lt;P&gt;The last two fields are from a different 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;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Nadeem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 06:42:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/need-help-in-understanding-some-fields-from-calendar/m-p/792409#M280123</guid>
      <dc:creator>fashid</dc:creator>
      <dc:date>2014-12-08T06:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: need help in understanding some fields from calendar</title>
      <link>https://community.qlik.com/t5/QlikView/need-help-in-understanding-some-fields-from-calendar/m-p/792410#M280124</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;1. YeartoDate(TempDate)*-1 as CurYTDFlag&lt;/P&gt;&lt;P&gt;this function returns -1 for true and false 0 and when you do *-1 the value you get is 1 or 0 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. YeartoDate(TempDate,-1)*-1 as LastYTDFlag&lt;/P&gt;&lt;P&gt;This also returns -1 or 0 same here for getting 0 and 1 you multiply -1 to get 1 or 0 for last year but using YeartoDate(TempDate,-1) it will return last year value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. And this Year2Date(TempDate, 0, 1, $(vToday))*-1 AS CurYTDFlag functions check the value if it exists in the given date or not if exists then returns -1 else 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Same for the Year2Date(TempDate,-1, 1, $(vToday))*-1 AS LastYTDFlag&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 06:58:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/need-help-in-understanding-some-fields-from-calendar/m-p/792410#M280124</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-12-08T06:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: need help in understanding some fields from calendar</title>
      <link>https://community.qlik.com/t5/QlikView/need-help-in-understanding-some-fields-from-calendar/m-p/792411#M280125</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;Thanks for replying . I got that part of multiplying (-1) , but i also wanted to know what is the use of these functions&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;nadeem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 07:53:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/need-help-in-understanding-some-fields-from-calendar/m-p/792411#M280125</guid>
      <dc:creator>fashid</dc:creator>
      <dc:date>2014-12-08T07:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: need help in understanding some fields from calendar</title>
      <link>https://community.qlik.com/t5/QlikView/need-help-in-understanding-some-fields-from-calendar/m-p/792412#M280126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you read the help files this is explained quite well. (YearToDate and Year2Date could replace each other)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"&lt;SPAN style="color: #ffffff; background-color: #3399ff;"&gt;YearToDate&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;date [ , yearoffset [ , firstmonth [ , todaydate] ] ]&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Returns true if a &lt;SPAN class="Italic"&gt;date&lt;/SPAN&gt; falls within the year to date, else false. If none of the optional parameters are used, the year to date means any date within one calender year from January 1 up to and including the date of the last script execution. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;By specifying a &lt;SPAN class="Italic"&gt;yearoffset&lt;/SPAN&gt; (0 if omitted), the function can be transposed to return true for the same period in another year. A negative &lt;SPAN class="Italic"&gt;yearoffset&lt;/SPAN&gt; indicate previous years while a positive one indicates coming years. Last year to date is achieved by specifying &lt;SPAN class="Italic"&gt;yearoffset&lt;/SPAN&gt; = -1. "&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The general concept of year to date is to sum upp all (e.g.) sales from the 1/1 to the current date and in your example compare it to the previous year. Most likely you apply the flags to something like =SUM(Sales*&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.8000001907349px;"&gt;CurYTDFlag) or alternatively they are used in a set analysis like =SUM({&amp;lt;CurYTDFlag={1}&amp;gt;} Sales).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Niklas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 08:11:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/need-help-in-understanding-some-fields-from-calendar/m-p/792412#M280126</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-12-08T08:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: need help in understanding some fields from calendar</title>
      <link>https://community.qlik.com/t5/QlikView/need-help-in-understanding-some-fields-from-calendar/m-p/792413#M280127</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;From Qlik Help &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="syntax"&gt;&lt;SPAN class="Bold"&gt;YearToDate(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;date [ , yearoffset [ , firstmonth [ , todaydate] ] ]&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Returns true if a &lt;SPAN class="Italic"&gt;date&lt;/SPAN&gt; falls within the year to date, else false. If none of the optional parameters are used, the year to date means any date within one calender year from January 1 up to and including the date of the last script execution. &lt;/P&gt;&lt;P&gt;By specifying a &lt;SPAN class="Italic"&gt;yearoffset&lt;/SPAN&gt; (0 if omitted), the function can be transposed to return true for the same period in another year. A negative &lt;SPAN class="Italic"&gt;yearoffset&lt;/SPAN&gt; indicate previous years while a positive one indicates coming years. Last year to date is achieved by specifying &lt;SPAN class="Italic"&gt;yearoffset&lt;/SPAN&gt; = -1. &lt;/P&gt;&lt;P&gt;By specifying a &lt;SPAN class="Italic"&gt;firstmonth&lt;/SPAN&gt; between 1 and 12 (1 if omitted) the beginning of the year may be moved forward to the first day of any month. If you e.g. want to work with a fiscal year beginning on May 1, specify &lt;SPAN class="Italic"&gt;firstmonth&lt;/SPAN&gt; = 5. &lt;/P&gt;&lt;P&gt;By specifying a &lt;SPAN class="Italic"&gt;todaydate&lt;/SPAN&gt; (timestamp of the last script execution if omitted) it is possible to move the day used as the upper boundary of the period. &lt;/P&gt;&lt;P class="example"&gt;Examples:&lt;/P&gt;&lt;P&gt;Assume last reload time = 1999-11-18&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;yeartodate( '1998-11-18')&lt;/SPAN&gt; returns false&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;yeartodate( '1999-02-01')&lt;/SPAN&gt; returns true&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;yeartodate( '1998-11-18', -1)&lt;/SPAN&gt; returns true&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;yeartodate( '1999-11-18', -1)&lt;/SPAN&gt; returns false&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;yeartodate( '1999-04-30', 0, 5)&lt;/SPAN&gt; returns false&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;yeartodate( '1999-05-01', 0, 5)&lt;/SPAN&gt; returns true&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This flags are used to filter the rows or the data that you have in the model and for what ever reason that is used&lt;/P&gt;&lt;P&gt;1. For viewing the last or current year data set &lt;/P&gt;&lt;P&gt;2. If want to use in the Aggregation function (Sum, Avg, Count, Only) for sum particular data set.&lt;/P&gt;&lt;P&gt;3. Or if it is used in the SET expression this are the reasons.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 08:20:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/need-help-in-understanding-some-fields-from-calendar/m-p/792413#M280127</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-12-08T08:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: need help in understanding some fields from calendar</title>
      <link>https://community.qlik.com/t5/QlikView/need-help-in-understanding-some-fields-from-calendar/m-p/792414#M280128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;Hi Anand ,&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;"By specifying a &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class="Italic" style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;yearoffset&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; (0 if omitted), the function can be transposed to return true for the same period in another year .&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;A negative &lt;/SPAN&gt;&lt;SPAN class="Italic" style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;yearoffset&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; indicate previous years while a positive one indicates coming years. Last year to date is achieved by specifying &lt;/SPAN&gt;&lt;SPAN class="Italic" style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;yearoffset&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt; = -1."&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-weight: inherit;"&gt;so if I write &lt;SPAN style="color: #3d3d3d; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;yeartodate( '1998-11-18', -1)&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp; , it will just check whether the date falls between&amp;nbsp; 1998-01-01 and the&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; last reload time = 1999-11-18 , if the date falls between these dates it will return -1 else 0 right .&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Correct me if i am wrong .&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sorry if this question seems stupid but it has been troubling me for a while .&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Regards,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Nadeem&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 09:55:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/need-help-in-understanding-some-fields-from-calendar/m-p/792414#M280128</guid>
      <dc:creator>fashid</dc:creator>
      <dc:date>2014-12-08T09:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: need help in understanding some fields from calendar</title>
      <link>https://community.qlik.com/t5/QlikView/need-help-in-understanding-some-fields-from-calendar/m-p/792415#M280129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the following three examples:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;YearToDate('1998-11-10', 0,1,'1998-11-18')&amp;nbsp; will result in -1 (true)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is true as the date 1998-11-10 can be found between 1998-01-01 and 1998-11-18&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;YearToDate('1998-11-10', -1,1,'1998-11-18') will result in 0 (false)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is false as the date 1998-11-10 cannot be found between 1997-01-01 and 1997-11-18&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;YearToDate('1997-11-10', -1,1,'1998-11-18') will result in -1 (true)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is true as the date 1997-11-10 can be found &lt;SPAN style="font-size: 13.6000003814697px;"&gt;between 1997-01-01 and 1997-11-18. Do notice that we have offset the years with -1 (year).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first date parameter is the one you compare to the date range. The second (last) date parameter can either be set manually, as in the example above, or will default to the last reload date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Niklas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 12:37:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/need-help-in-understanding-some-fields-from-calendar/m-p/792415#M280129</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-12-08T12:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: need help in understanding some fields from calendar</title>
      <link>https://community.qlik.com/t5/QlikView/need-help-in-understanding-some-fields-from-calendar/m-p/792416#M280130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Niklas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so very much it is now very much clear to me&amp;nbsp; the way you have explained with the examples..&lt;/P&gt;&lt;P&gt;Thanks once again &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; and have a great day !!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Nadeem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Dec 2014 05:35:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/need-help-in-understanding-some-fields-from-calendar/m-p/792416#M280130</guid>
      <dc:creator>fashid</dc:creator>
      <dc:date>2014-12-09T05:35:33Z</dc:date>
    </item>
  </channel>
</rss>

