Hi, i have a table in which i have many ID, each id represent a worker, each worker can take different shifts during a day, for example the worker Albert, took a shift from 10am to 12pm (2h) and 4pm to 7pm (3h) I want to calculate, first the sum of the total hours that albert worked during a day and then i want to calculate that total (total of hours working per day) the average of every worker. I want to know how many hours a worker can work during a day in a specific range of time, by id and city.
The first image is the sum of the total hours worked everyday by id, but it is imposible to get an avegare by row of this.
There you have it, I want to create something like in Sheet 1, there you can see the total of hours worked in a day by ID (tableau did the sum) because each shift is has different duration, at the end i want to do the sum first by each day to know the total hours per day and then the average of hours by id in the entire time, then the average of hours in each city (doing the average of hours of each worker that belongs each city).