Workday() not able to exclude a holiday list

Hi.
I’m making a progress plan and want to exclude several periods of holidays.
I’ve made a separate Holidaytable with the option of up to five periods [Date_From] and [Date_To].
In order to get a list of dates to exclude in “Workday()”, I’ve used the tip from @Aleksi with:
TOP (LIST ([Date_From],
[Date_From] +1,
[Date_From] +2,
[Date_From] +3,
[Date_From] +4,
[Date_From] +5,
[Date_From] + …,
[Date_From] +30),
HOUR ([Date_To] - [Date_From]) / 24)
I do this 5 times (adding the lists). This works great (big expression, though). I get one single list of dates from my 5 different holiday periods.

But when I am to exclude these dates from my progress plan periods, I am struggling!
I tried both a virtual column and a permanent one with:
Workday([Project_start], [No of workdays], Holidaytable[List_of_non-workdays])
The error I get is: “Holidaytable[List_of_non-workdays]” has the wrong element type: List.
But in @Steve 's manual on Workday(), it says that it has to be a list.
I’ve also tried a workaround and collected the list from a field that is not a LIST type, but then the error is the oposite (the last part of Workday() has to be a list).

I’m starting to suspect that the workday() formula has to make the list itself from a table with several records, and doesn’t accept an already complete list.
But if that is the case, how to work around this?
I cannot type a new record for each holiday date for a holiday of eg. 4 weeks.

0 29 1,678
29 REPLIES 29
Top Labels in this Space