Discussion Board for collaboration on QlikView Scripting.
I have a doubt about inyear to date function
inyeartodate(Tempdate, $(vToday),0)* -1 as CurYTDFlag,
inyeartodate(Tempdate, $(vToday, -1)* -1 as LastYTDFlag,
in the first part of the script it says -1 as CurYTDFlag and in the second part it says that -1 as LastYTDFlag. So CurYTDFlag will be -1 or LastYTDFlag, will be -1? can someone clarify on this.
Go to Solution.
it was in your script
- without *-1 you get 0 e -1 as result
- with *-1 you get 0 e 1 as result
it depends on Tempdate (I think vToday is Today)
try this to see the difference (add the result to a table box)
date(makedate(2014) + rowno()-1) as Tempdate
InYearToDate (Tempdate, today() , 0)*-1 as InYearToDate_Today_0,
InYearToDate (Tempdate, today() , -1)*-1 as InYearToDate_Today_1
I tried using this script. One thing which is not clear is why have you used -1 as InYearToDate_Today_0and InYearToDate_Today_1. I am very new to qlikview
Thanks Massimo for the help. Now I understood.