Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I tried looking for this but could not find a solution
I have a table with the following table loaded into Qlikview
Load
[Employee Number]
Absence Type
[Date Start]
[Date End]
I now need to recreate the table so that it adds a date column which capture all the dates an employee took a leave
Load
[Employee Number]
Absence Type
Date
Figured I need to loop in order to do this. In programming world the logic would be
load
$vDifference = [Date End] - [Date Start]
[Employee Number]
Absence Type
For i = 0, i < $vDifference, i++
[Date Start] + i as Date;
How do I do this in Qlikview?
In addition to use Today(1), you may want to change the WHILE clause to
DateList:
LOAD
//Date([Date Start]+iterno()-1) as Date
Date([StartDate]+iterno()-1,'YYYYMMDD') as DatesArray
resident INPUT while [StartDate]+IterNo()-1 <= $(vStopDate);
Thank you very much... u made my day. I spent 1 day on searching this... Thanks again
Hi Stefan,
This works pretty great, except it the While/IterNo logic is only being applied to my samples lines from the Input table. How can I get the logic to be applied to all of the lines in my data set?
Thanks!
Hi Stefan,
I made a separate post for my question with sample data. If you could take a look, I would greatly appreciate it.
Thanks!