Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I'm needing to find out how long certian tasks are taking. I have the columns BI_EVENT_DT_TM, BI_SO_NBR, and BI_TASK_CD. There's also BI_WRKFLW_TASK_SEQ_NBR but tasks are not always completed in the correct order so the sequence number can't be used.
In order to get the needed results I need to have my dataset order by BI_SO_NBR so I'm just finding times for tasks within their respective service order, then order by BI_EVENT_DT_TM ascending. After they're ordered in the formula I then need to subtract the time between one line's BI_EVENT_DT_TM by the BI_EVENT_DT_TM of the task that was completed after it.
So if the a service order had 2 tasks in it one timed at 12:00:00 and the next at 12:00:10 I would get a value of 10 seconds or 00:00:10 for "TASK TIME" for the first task.
This code is close but not there yet. It returns the running sum of time for each Service order and the results are off by one row.
User | Count |
---|---|
57 | |
22 | |
21 | |
19 | |
16 |
User | Count |
---|---|
87 | |
87 | |
52 | |
37 | |
23 |