
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Excluding holidays from dataset using NetWorkDays
Hi,
I'm trying to automate holiday exclusion in NetWorkDays but keep getting an error.
My app helps control a process. Employees from different countries must complete a task within 48 working hours - excluding weekends and public holidays. Each employee has different public holidays since they're from different countries.
I've been using NetWorkDays(StartDate, EndDate) with the right result. I've also tried adding holidays manually and it works: NetWorkDays(StartDate, EndDate, '01.01.2020', '02.01.2020').
If I try to use a concat for the holidays, it breaks. I've tried all the options below. Needless to say, when I print simply the results of the Concat, everything is fine.
- NetWorkDays(StartDate, EndDate, Concat(HolidayDate, ', '))
- NetWorkDays(StartDate, EndDate, Concat([HolidayDate.autoCalendar.Date], ', '))
- NetWorkDays(StartDate, EndDate, Concat('''' & Text([HolidayDate.autoCalendar.Date]) & '''', ', '))
What am I doing wrong? It seems like Concat is not the right option, but why?
Cheers,
Fabio
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
It works for me what @martinpohl suggested please go thru the app attached
Thanks
Kashyap.R

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
try creating a variable and assign the holidays to that variable and use that in the expression.
Hope this helps
thanks
Kashyap.R

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Do you mean like vListHolidays = Concat(HolidayDate, ', ')?
I have already tried but it didn't work.
Best,
Fabio

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Can u please tell me what is in the Holiday date and format?
Thanks
Kashyap.R

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's date objects in standard format - e.g. 01.01.2020.
I have created a test app for clarity.
Best,
Fabio


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try instead:
vListHolidays = chr(39)&Concat(HolidayDate, chr(39)&','&chr(39))&chr(39)
to set all holidayday dates in ' '
Regards

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
It doesn't change anything 😕

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
It works for me what @martinpohl suggested please go thru the app attached
Thanks
Kashyap.R

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, issue found! Your app adds an equal sign to the variable expression (which is why it cannot be printed in the table). With that, everything works.
