Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
it was in your script
I think:
- 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)
a:
load
date(makedate(2014) + rowno()-1) as Tempdate
autogenerate 730;
load
Tempdate,
InYearToDate (Tempdate, today() , 0)*-1 as InYearToDate_Today_0,
InYearToDate (Tempdate, today() , -1)*-1 as InYearToDate_Today_1
Resident a;
Thanks Massimo.
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
it was in your script
I think:
- without *-1 you get 0 e -1 as result
- with *-1 you get 0 e 1 as result
Thanks Massimo for the help. Now I understood.