Skip to main content
Announcements
YOUR OPINION MATTERS! Please take the Qlik Experience survey you received via email. Survey ends June 14.
cancel
Showing results for 
Search instead for 
Did you mean: 
ashis
Creator III
Creator III

Need to calculate 6th working days in script

Hi ,

I have a table in database that gives me all working days in DD/MM/YYYY format column name workingdays

Based on this column I need to calculate 6th working day for a month in the script level. If it is 6th working day then run the script if not then exit .

in the screenshot attached,

01/04/2021 - 1st working day in April

06/04/2021 - 2nd working day in April

07/04/2021 - 3rd working day in April

likewise I need to calculate 6th working day

 

if (condition =6th working days, then run my script , else exit)

 
 

Please could you help.

 

2 Replies
QFabian
Specialist III
Specialist III

Hi @ashis , you can try something like this :


A:
Load distinct
workingdays
from yoursoource
where day(workingdays) = 6;

if NoOfRows('A')>0 then
Load
fields,
workingdays
from yoursoource;
end if

QFabian
ashis
Creator III
Creator III
Author

Hi QFabian,

Thank you very much for your reply. I applied your logic however it is giving me 6th day of each month.

If you see my post above I want to calculate first , second … working days based on the dates available in my table. Your logic is giving me this output. Please find the attached screen shot.

Regards,