Grouping issues

gplhl

Board Regular
Joined
Feb 23, 2002
Messages
176
Afternoon, I am trying to work out from a data set how long a particular type of work has been running. I have start and end times, and can create a key field, but my problem is the data is being produced over multiple years, 24 hours a day. So looking for how to group I am struggling. At the change of any item in Orange, I need to group by and subtract the min start time from max end time. However, this data is repeated several times within the table and crosses days, so I cannot add a date into a key. If there is a gap I need to count as separate. Trying to do this in powerquery.

1644336150139.png
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Just add subtotals for change in Key - choose MAX for Start Time and End Time, then you need to change SUBTOTAL(4 to SUBTOTAL(5 for Start TIme - then collapse to level 2, and create your Run Time formulas in the visible cells.
 
Upvote 0
Reload your data using XL2BB so that we don't have to retype your data to test our solutions. This is possible in Power Query, but you need to give us data we can manipulate.
 
Upvote 0

Forum statistics

Threads
1,216,303
Messages
6,129,984
Members
449,549
Latest member
birdguy_1930

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top