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: 
tulsidaskhan
Contributor
Contributor

How to create calender with Start date and end date

Hi,

I have two columns as Start date and End date in my data. I want to connect my data with calendar. how to join calendar with this data so as to connect calendar with both start and End date.

Thanks,

Piyush Jain

3 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

beck_bakytbek
Master
Master

hi jain. this is very simple example that helps you to understand this issue (with only working days)

try this code:

 

let vStartDay = date('01/01/2010');
let vEndDate = date('31/12/2016');



for x = vStartDay to vEndDate

tempCalendar:
load $(x) as Date AutoGenerate(1);

next x

NoConcatenate

Working_Calendar:
Load Date, weekday(Date) as WeekDay, week(Date) as Week, Month(Date) as Month, Year(Date) as Year, floor(month(Date)/3)+1 as Qtr

resident tempCalendar

where WeekDay(Date) <> 'Sat' and WeekDay(Date) <> 'Sun';

drop table tempCalendar;

 

if you Need more examples to this issue. so let me know

beck

sunny_talwar

You can use intervalMatch:

IntervalMatch

or use While loop to expand start to end dates into a date field:

Creating Reference Dates for Intervals