Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Pomna
Creator III
Creator III

IterNo

l would like to generate dates between two dates . That is, [Start Date] and [End Date]. But when I run the code below it runs with out end. Below is the code. I would like to know what am doing wrong. Thanks for your suggestions

 

[HR Status DatesTmp]:
Load *,
Date([Start Date] + IterNo() - 1 ) as [Status Date]
Resident [Applicant]
While IterNo() <= Date([Start Date]) - Date([End Date]) + 1 ;

2 Replies
MayilVahanan

Hi Pomna,

Try like below

Load *,
Date([Start Date] + IterNo() - 1 ) as [Status Date]
Resident [Applicant]
While Floor([Start Date]) + IterNo()-1 <= Floor([End Date]);

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I think you just reversed Start & End. Should be:

While IterNo() <=Date([End Date])  - Date([Start Date])  + 1 ;