Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
151562
Contributor III
Contributor III

create calendar with for loop

hello
I have a contract table that has a start and end date.
I need to generate a calendar between the smallest start date and the largest end date of a table.
Then make a for loop where I get each contract and its start/end dates, and from my calendar get the dates that are between them.
How can I do this?

Thank you,
FPS
Labels (1)
1 Reply
marcus_sommer

You may use an internal while-loop to get each date between start and end and which is then associated with the master-calendar, for example:

t: load contract, start, end, date(start + iterno() - 1) as date
    from source while start + iterno() - 1 <= end;