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: 
Seier-Alsenz
Contributor II
Contributor II

Loop in a Load

Hi guys,

im new in qlik app development and have following question.

 

i have following data:

ID, Name, BeginDate, EndDate

i want to create for each year which is between BeginDate and EndDate create a data set und count the num of networkdays for each year/dataset.

unfortunately I don't really understand how to include the do-loop in the load command without causing a syntax error.


do you have some examples?

 

kind regards

 

Labels (1)
1 Solution

Accepted Solutions
canerkan
Partner - Creator III
Partner - Creator III

Hi Seier-Alsenz,

try something like this:

Table:
Load
ID,
Name,
BeginDate,
BeginDate + IterNo()-1 as Date,
EndDate
From ....
while BeginDate + IterNo()-1 <= EndDate;

 

This should do the trick. All you have to do from there is to mark the working days.

 

Let me know if it helped.

Regards,

Can

View solution in original post

3 Replies
canerkan
Partner - Creator III
Partner - Creator III

Hi Seier-Alsenz,

try something like this:

Table:
Load
ID,
Name,
BeginDate,
BeginDate + IterNo()-1 as Date,
EndDate
From ....
while BeginDate + IterNo()-1 <= EndDate;

 

This should do the trick. All you have to do from there is to mark the working days.

 

Let me know if it helped.

Regards,

Can

Seier-Alsenz
Contributor II
Contributor II
Author

Thank you for your help. Thats exactly the function i need.

Unfortunately, this seems to be indicative of my 3-day development qlik-sense training, that this simple functionality was not presented there.

canerkan
Partner - Creator III
Partner - Creator III

Hi Seier-Alsenz,

I'm glad I could help you! Please mark correct answers as solutions so other people having the same problem can see that there might be a solution for them as well.

Regards,

Can