Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
fcecconi
Partner - Creator III
Partner - Creator III

YearToDATE

I am trying to create some flags in my master calendar, but I am having some issues when I have to hard code the end date.

I am hard coding my end date to be (this will be set to Today() when I go live)

Let vEndDate=Floor(MakeDate(2015,12,31));


Then I need to set a CYTD and PYTD flag.  Here is the code I am using

  -Year2Date(Datum) As CYTD_Flag,

-Year2Date(Datum, -1) As PYTD_Flag,

I am trying to use this new code, but the flag is not being set

  -YeartoDate(Datum ,0 ,0 ,$(vEndDate) ) As CYTD_Flag,

What am I doing wrong?

thanks

1 Solution

Accepted Solutions
sunny_talwar

Not sure but think may be part of the problem. You are giving third argument a value of 0. Look here in help section that it needs to be between 1 and 12 (QlikView ‒ yeartodate - script and chart function)

Capture.PNG

View solution in original post

3 Replies
sunny_talwar

Not sure but think may be part of the problem. You are giving third argument a value of 0. Look here in help section that it needs to be between 1 and 12 (QlikView ‒ yeartodate - script and chart function)

Capture.PNG

fcecconi
Partner - Creator III
Partner - Creator III
Author

I made my change to this: -YeartoDate(Datum,0,1,$(vEndDate)) as CYTD_FLAG,


Thanks Sunny!

sunny_talwar

No problem at all