The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi All,
I'm kind of stuck with this requirement.Hope some guidance can be provided here.
I have to calculate break for a call handler who has worked the full 30 min slot.
There are certain rules to be placed before we calculate the breaks.
1) First slot and last slot do not qualify for break. In my example 08:00 and 09:30(first & last slot) - no break same like (10.30 & 11.30) - no break and (13:00 & 16:00) - no break
2) If they have worked for the full slot they are eligible for an amount of time e.g 30 seconds( all slots are 1800 secs or divided by 30 min)
The column values that are available is slot index and event time begin and event time.
Many thanks and I appreciate all kinds of input on this scenario.
Hi,
please post some sample data
Name | scheddate | evenstarttime | timeworked | slotnumber | Break |
AAA | 22/02/2023 | 08:00 | 18000 | 16 | no break(first slot) |
AAA | 22/02/2023 | 08:30 | 18000 | 17 | 30sec |
AAA | 22/02/2023 | 09:00 | 18000 | 18 | no break(last slot) |
BBB | 22/02/2023 | 08:00 | 17900 | 16 | no break(first slot) |
BBB | 22/02/2023 | 08:30 | 18000 | 17 | 30sec |
BBB | 22/02/2023 | 09:00 | 18000 | 18 | no break(last slot) |
CCC | 22/02/2023 | 08:30 | 18000 | 17 | - |
CCC | 22/02/2023 | 09:00 | 18000 | 18 | 30sec |
CCC | 22/02/2023 | 10:00 | 18000 | 20 | 30sec(or 60 secs added from previous slot) |
CCC | 22/02/2023 | 10:30 | 17900 | 21 | no break(because 18000 not worked) |
CCC | 22/02/2023 | 11:00 | 18000 | 22 | 30 sec |
CCC | 22/02/2023 | 11:30 | 18000 | 23 | 30 sec(or 60 secs added from previous slot) |
CCC | 22/02/2023 | 12:00 | 18000 | 24 | no break(last slot of work) |
Hi please let me know if this helps