Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Infilling dates between a start and end date to create a holiday calendar

I'm looking to create a holiday calendar via a pivot table. For each employee and holiday period I have a start date and an end date but I need to infill the dates between.

Ie

EmployeeStart DateEnd Date
Gavin1/3/201415/3/2014
Dean15/3/201430/03/2014

To be able to show this in a calendar I need to create a holiday record for the days in between

NameHeader 2
Gavin01/03/2014
Gavin02/03/2014
Gavin03/03/2014
Gavin04/03/2014
Dean15/03/2014
Dean16/03/2014
Dean17/03/2014

Obviously I've not added all the dates in this second table but hopefully you get the idea of where I'm trying to get to. I've also added a sample of the holiday calendar that I'm trying to recreate. Any advice would be greatly appreciated

3 Replies
MK_QSL
MVP
MVP

Use enclosed file which can help you to fill missing data...

Not applicable
Author

Thanks for your reply Manisha. In reality my data is slightly different. Will your example still work if my data is as below?

TempTable:

LOAD * Inline

[

  Item, Start Date, End Date Price

  A, 01/10/2010, 10/10/2010, 100

  A 15/11/2010, 19/11/2010, 200

  B, 03/10/2010, 04/10/2010, 100

  B, 08/10/2010, 14/10/2010, 400

];

maxgro
MVP
MVP

T:

load * inline [

Employee, StartDate, EndDate

Gavin, 1/3/2014 ,15/3/2014

Dean, 15/3/2014 ,30/03/2014

];

T2:

NoConcatenate load

Employee,

date(StartDate + iterno() -1) as Date

resident T

while iterno() <= EndDate - StartDate +1;