Calculate hours

Hello All

I am requiring some assistance with the following and i am not completely sure how to go about it

I have 3 calculated columns that looks at the day an employee has worked and gives

Hours worked
Available hours
Hours difference between the above

The available hours looks at the earliest start time and the latest end time on the days the employee has worked

I wish to have a calculation that shows the sum of hours worked, available hours and hours diff over a date or date range

In the example below.

image

The expected results would be

Hours worked = 8.75
Available Hours = 17
Hours Diff = 8.25

Without removing columns and also showing sum totals i cannot seem to get my head around how to acheive the results

Any assistance would greatly be appreciated

time difference.pbix (69.6 KB)