Hi @kurzashane,
There’s a bit to it but Power Query is up to the task.
-
Created a Table.Buffer step to load the Sorted table into memory.
-
Created a nested table containing only the rows for the Current Job Requisition
-
Added a Custom Column with the required logic
if Text.Contains([#"Freeze/Unfreeze"], "Freeze") and [Job Approval date] < [#"Freeze/Unfreeze date"] then List.Count( List.Select( List.Dates( Record.Field(Table.Min([TempTable], "Freeze/Unfreeze date"), "Freeze/Unfreeze date"), Number.From( Record.Field(Table.Max([TempTable], "Freeze/Unfreeze date"), "Freeze/Unfreeze date") ) - Number.From( Record.Field(Table.Min([TempTable], "Freeze/Unfreeze date"), "Freeze/Unfreeze date") ) + 1, Duration.From(1) ), each Date.DayOfWeek(_, 1) < 5 ) ) else 0
.
For other posts, containing parts of this Power Query technique see:
.
I hope this is helpful. Here’s my sample file.
PQ working days job logic.pbix (29.8 KB)