Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Folks,
i got a question regarding of creating of data-interval, i have the following example:
MyTable:
Employee, Occupation, Data
A, Junior, 01.01.2020
A, Senior, 15.08.2020
based on above example, i have a question. is that possible to create two Columns from one Column: Data
My expected output is:
Employee, Occupation, Start, End
A, Junior, 01.01.2020 14.08.2020
A, Senior, 15.08.2020 30.09.2020 (Today)
Does anybody have any idea how to resolve this issue. Thanks a lot for any feedbacks.
Beck
Try this
Table:
LOAD * INLINE [
Employee, Occupation, Data
A, Junior, 01.01.2020
A, Senior, 15.08.2020
];
FinalTable:
LOAD Employee,
Occupation,
Data as Start,
Date(If(Employee = Previous(Employee), Peek('Start')-1, Today())) as End
Resident Table
Order By Employee, Data desc;
DROP Table Table;
Try this
Table:
LOAD * INLINE [
Employee, Occupation, Data
A, Junior, 01.01.2020
A, Senior, 15.08.2020
];
FinalTable:
LOAD Employee,
Occupation,
Data as Start,
Date(If(Employee = Previous(Employee), Peek('Start')-1, Today())) as End
Resident Table
Order By Employee, Data desc;
DROP Table Table;
Sunny,
thanks a lot for your valuable time and attention