I am attaching sample file for your reference. Please try to use that logic.
In case not able to apply same logic than please share the sample file. Day Name.xlsx (25.2 KB)
Hi @Abeer,
To set Friday as the only non-working day of the week you can modify the following line of code:
InsertIsWorkingDay = Table.AddColumn(InsertIsAfterToday, “IsWorkingDay”, each if Date.DayOfWeek([Date], Day.Saturday) = 6 then false else true, type logical),
In this other way, we would also obtain the same result:
InsertIsWorkingDay = Table.AddColumn(InsertIsAfterToday, “IsWorkingDay”, each if Date.DayOfWeek([Date], Day.Monday) = 4 then false else true, type logical),
Hi @Abeer,
The Date.DayOfWeek([Date], Day.Monday) function returns a value from 0 to 6 starting in this case with Monday, since we passed Day.Monday as the second parameter
To set Friday and Saturday the return value has to be 4 or 5.
InsertIsWorkingDay = Table.AddColumn(InsertIsAfterToday, “IsWorkingDay”, each if Date.DayOfWeek([Date], Day.Monday) = 4 or Date.DayOfWeek([Date], Day.Monday) = 5 then false else true,