Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Join “Do More With Qlik” with Mike Tarallo to get a first-hand look at the New Authoring Experience, June 29th: REGISTER HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
sai_katare
Contributor III
Contributor III

YearToDate example clarification - Qlik Help Referrence

Hi All,

I was trying to understand YearToDate function in QlikSense Help and i am unable to understand the following: 

sai_katare_0-1590515958152.png

How can this be true for a script reload date of 18/11/2011 ?

Here ('2010-11-18',  -1) would offset to date '2009-11-18' right? And '2009-11-18' does not fall in the range of '2011/01/01 to 2011/11/18' which YearToDate function is calculating.

Please let me know if I am missing any logic here or Qlik help needs an update here.

Labels (1)
1 Solution

Accepted Solutions
ManuelLindekeit
Contributor III
Contributor III

The offset is applied to the last reload date. So in the example the -1 offset moves 2011-11-18 to 2010-11-18 and then tests if 2010-11-18 is in 2010. 

Hence, TRUE is returned for yeartodate( '2010-11-18', -1).

View solution in original post

2 Replies
ManuelLindekeit
Contributor III
Contributor III

The offset is applied to the last reload date. So in the example the -1 offset moves 2011-11-18 to 2010-11-18 and then tests if 2010-11-18 is in 2010. 

Hence, TRUE is returned for yeartodate( '2010-11-18', -1).

sai_katare
Contributor III
Contributor III
Author

Thanks ManuelLindekeit.

I was thinking the offset is applied on the expression date. Thanks for the clarification.