Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Networkdays from field

Dear all,

I'm trying to do networkdays from a Field but it's not working correctly.

I have a calendar with near 100 departments and each one has his own holiday calendar.

I'm creating a new Table with two fields,

first one is the department and second one is the concat of the holiday days.

LET Counter = FieldValueCount('Department');

For i=0 to $(Counter)-1

Let Dep1 = peek('Department', $(i), 'Agency');

Holidays_Temp:

  LOAD Distinct Date (Days,'DD/MM/YYYY') AS Holiday_date

  FROM File.qvd (qvd)

  WHERE Department='$(Dep1)';

   Holidays:

     LOAD

     $(Dep1) AS Department,

     concat(chr(39) & date(Holiday_date,'DD/MM/YYYY') & chr(39),',') AS Holidays_End

     RESIDENT Holidays_Temp;

     Drop Table HolyDays_Temp;

next

After that I'm doing a left join to another table, but function

networkdays(Init_Date,End_Date,Holidays_End) - 1 doen't work, but If I put Holydays_End on a variable and I do the same formula on textbox it works.

How can I use a field as Holidays without use a variable?

Best regards

Labels (1)
2 Replies
Not applicable
Author

Any ideas?

Anonymous
Not applicable
Author

I'm having the same issue.  Let me know if you figure out anything.