Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I would like to reach the following result from that type of data.
Simply to be able to create extra lines when a a task ( DutyMinutes ) has to be repeated over a few weeks.
for instance, the third line will have two lines as a result as it covers weeks 25 and 26 of 2017.
I tried to use peek in resident table but got totally lost !
Any help please ?
Employee | DutyMinutes | WeekStart | WeekEnd |
S. BOLlQUIER | 20 | 201724 | 201724 |
S. BOLlQUIER | 15 | 201725 | 201725 |
S. BOLlQUIER | 20 | 201725 | 201726 |
S. BOLlQUIER | 35 | 201726 | 201728 |
Employee | DutyMinutes | Week | |
S. BOLlQUIER | 20 | 201724 | |
S. BOLlQUIER | 15 | 201725 | |
S. BOLlQUIER | 20 | 201725 | |
S. BOLlQUIER | 20 | 201726 | |
S. BOLlQUIER | 35 | 201726 | |
S. BOLlQUIER | 35 | 201727 |
|
S. BOLlQUIER | 35 | 201728 | |
Hi Philippe,
Data:
LOAD * INLINE [
Employee, DutyMinutes, WeekStart, WeekEnd
S. BOLlQUIER, 20, 201724, 201724
S. BOLlQUIER, 15, 201725, 201725
S. BOLlQUIER, 20, 201725, 201726
S. BOLlQUIER, 35, 201726, 201728
];
Result:
LOAD
Employee,
DutyMinutes,
WeekStart + IterNo() -1 as Week
Resident Data
While WeekStart + IterNo()-1 <= WeekEnd;
DROP Table Data;
Hi Philippe,
Data:
LOAD * INLINE [
Employee, DutyMinutes, WeekStart, WeekEnd
S. BOLlQUIER, 20, 201724, 201724
S. BOLlQUIER, 15, 201725, 201725
S. BOLlQUIER, 20, 201725, 201726
S. BOLlQUIER, 35, 201726, 201728
];
Result:
LOAD
Employee,
DutyMinutes,
WeekStart + IterNo() -1 as Week
Resident Data
While WeekStart + IterNo()-1 <= WeekEnd;
DROP Table Data;
Hi Tamil !
Thanks a lot works like a Wonder .
have a nice day
Great. You too have a fantastic day, Philippe.