Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
sbfernandes
Contributor III
Contributor III

Find Start and End Dates from a Block of Dates

Greetings!

I am trying to find the start and end dates for StaffNo based on a sequence of consecutive dates.

From below table, StaffNo and Work_Date is the input. Output required from script is Start_Date, End_Date

StaffNoWork_DateStart_DateEnd_Date
11101-Jan-1701-Jan-1704-Jan-17
11102-Jan-1701-Jan-1704-Jan-17
11103-Jan-1701-Jan-1704-Jan-17
11104-Jan-1701-Jan-1704-Jan-17
11108-Mar-1908-Mar-1911-Mar-19
11109-Mar-1908-Mar-1911-Mar-19
11110-Mar-1908-Mar-1911-Mar-19
11111-Mar-1908-Mar-1911-Mar-19
22213-Apr-1813-Apr-1817-Apr-18
22214-Apr-1813-Apr-1817-Apr-18
22215-Apr-1813-Apr-1817-Apr-18
22216-Apr-1813-Apr-1817-Apr-18
22217-Apr-1813-Apr-1817-Apr-18
22229-Dec-1929-Dec-1908-Jan-20
22230-Dec-1929-Dec-1908-Jan-20
22231-Dec-1929-Dec-1908-Jan-20
22201-Jan-2029-Dec-1908-Jan-20
22202-Jan-2029-Dec-1908-Jan-20
22203-Jan-2029-Dec-1908-Jan-20
22204-Jan-2029-Dec-1908-Jan-20
22205-Jan-2029-Dec-1908-Jan-20
22206-Jan-2029-Dec-1908-Jan-20
22207-Jan-2029-Dec-1908-Jan-20
22208-Jan-2029-Dec-1908-Jan-20

 

1 Solution

Accepted Solutions
alex00321
Creator II
Creator II

Hi I use scripts to meet your requirements.

View solution in original post

2 Replies
alex00321
Creator II
Creator II

Hi I use scripts to meet your requirements.

View solution in original post

sbfernandes
Contributor III
Contributor III
Author

Hi Alex00321

This works perfectly. Thank you very much.