Hello @nichbenn, welcome to the QuickSight community!
I am curious, are you using this calculation in a table where the data is going to be displayed at the name/department level? The main issue with your function, is you are comparing an aggregated field and a nonaggregated field. If the data is being displayed at the correct partitions, you could aggregate the comparison hours by min, max, or sum, and it should then be able to be compared to the result of the lag function.
Let me know if that helps!