Bishop1999
New Member
- Joined
- May 31, 2013
- Messages
- 8
I have a very large data set consisting of members yearly work activity.
The primary field is the work order number that may have one to many jobs that may be completed in one to many days.
What I seek is to group / break the work order in power query then provide the days elapsed, and total hours spent at the bottom of the group using power query. In Excel I can use the subtotal feature and manually subtract the begin date from the end date for each occurrence but I wouldn't be taking advantage of PQ. Any Ideal
Sample data
[TABLE="width: 676"]
<tbody>[TR]
[TD]WO #[/TD]
[TD]EMP[/TD]
[TD]Date Start[/TD]
[TD]Date End[/TD]
[TD] Time Start[/TD]
[TD]Time End[/TD]
[TD]Total Hrs[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]John, Doe[/TD]
[TD]12/4/2017[/TD]
[TD]12/4/2017[/TD]
[TD]13:56[/TD]
[TD]14:48[/TD]
[TD]0.85778[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]John, Doe[/TD]
[TD]12/5/2017[/TD]
[TD]12/5/2017[/TD]
[TD]10:03[/TD]
[TD]10:33[/TD]
[TD]0.50583[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]John, Doe[/TD]
[TD]12/5/2017[/TD]
[TD]12/5/2017[/TD]
[TD]10:33[/TD]
[TD]10:33[/TD]
[TD]0.00306[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]John, Doe[/TD]
[TD]12/6/2017[/TD]
[TD]12/6/2017[/TD]
[TD]7:00[/TD]
[TD]8:53[/TD]
[TD]1:53[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]John, Doe[/TD]
[TD]12/6/2017[/TD]
[TD]12/6/2017[/TD]
[TD]8:00[/TD]
[TD]9:27[/TD]
[TD]1:27[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]John, Doe[/TD]
[TD]12/6/2017[/TD]
[TD]12/6/2017[/TD]
[TD]9:30[/TD]
[TD]16:00[/TD]
[TD]6:30[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]John, Doe[/TD]
[TD]12/13/2017[/TD]
[TD]12/13/2017[/TD]
[TD]7:00[/TD]
[TD]16:30[/TD]
[TD]9:30[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]John, Doe[/TD]
[TD]12/30/2017[/TD]
[TD]12/30/2017[/TD]
[TD]15:00[/TD]
[TD]15:54[/TD]
[TD]0:54[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 487"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
</tbody>[/TABLE]
The primary field is the work order number that may have one to many jobs that may be completed in one to many days.
What I seek is to group / break the work order in power query then provide the days elapsed, and total hours spent at the bottom of the group using power query. In Excel I can use the subtotal feature and manually subtract the begin date from the end date for each occurrence but I wouldn't be taking advantage of PQ. Any Ideal
Sample data
[TABLE="width: 676"]
<tbody>[TR]
[TD]WO #[/TD]
[TD]EMP[/TD]
[TD]Date Start[/TD]
[TD]Date End[/TD]
[TD] Time Start[/TD]
[TD]Time End[/TD]
[TD]Total Hrs[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]John, Doe[/TD]
[TD]12/4/2017[/TD]
[TD]12/4/2017[/TD]
[TD]13:56[/TD]
[TD]14:48[/TD]
[TD]0.85778[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]John, Doe[/TD]
[TD]12/5/2017[/TD]
[TD]12/5/2017[/TD]
[TD]10:03[/TD]
[TD]10:33[/TD]
[TD]0.50583[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]John, Doe[/TD]
[TD]12/5/2017[/TD]
[TD]12/5/2017[/TD]
[TD]10:33[/TD]
[TD]10:33[/TD]
[TD]0.00306[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]John, Doe[/TD]
[TD]12/6/2017[/TD]
[TD]12/6/2017[/TD]
[TD]7:00[/TD]
[TD]8:53[/TD]
[TD]1:53[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]John, Doe[/TD]
[TD]12/6/2017[/TD]
[TD]12/6/2017[/TD]
[TD]8:00[/TD]
[TD]9:27[/TD]
[TD]1:27[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]John, Doe[/TD]
[TD]12/6/2017[/TD]
[TD]12/6/2017[/TD]
[TD]9:30[/TD]
[TD]16:00[/TD]
[TD]6:30[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]John, Doe[/TD]
[TD]12/13/2017[/TD]
[TD]12/13/2017[/TD]
[TD]7:00[/TD]
[TD]16:30[/TD]
[TD]9:30[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]John, Doe[/TD]
[TD]12/30/2017[/TD]
[TD]12/30/2017[/TD]
[TD]15:00[/TD]
[TD]15:54[/TD]
[TD]0:54[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 487"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
</tbody>[/TABLE]