Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Creator II
Creator II

Hi I use scripts to meet your requirements.

View solution in original post

2 Replies
Highlighted
Creator II
Creator II

Hi I use scripts to meet your requirements.

View solution in original post

Highlighted
Contributor III
Contributor III

Hi Alex00321

This works perfectly. Thank you very much.