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] + …,
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.