Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi Everyone,
Good day!
Hoping to get some help on below problem.
I have a table containing multiple door accesses of employees in a period. I also have another table where it contains the shifts and the earliest allowed time in and latest allowed time in a shift. I want to capture the first & last door access that was made but should be within the earliest allowed time in and latest allowed time in. My problem now is with employees who are on the 3rd shift where they make their first door access on the current day and they make their last door access the following day. Also, there are some who makes door access earlier than the earliest allowed time in and makes door access beyond the latest allowed time in. Additional problem is that there are multiple door accesses in between. Below are my tables.
Door Accesses Table
Shift Table
Result Table
Thanks a lot in advance for the help.
Jerry
Solved! Go to Solution.
I tried to identify the shift date for each door access rows with a calculate column as below and then find the min and max datetime in each shift. . See more details in the attached pbix.
SHIFT ON = IF ( HOUR ( yourTable[DATE] ) >= 17, DATEVALUE ( yourTable[DATE] ), IF ( HOUR ( yourTable[DATE] ) <= 13, DATEVALUE ( yourTable[DATE] ) - 1, BLANK () ) )
I tried to identify the shift date for each door access rows with a calculate column as below and then find the min and max datetime in each shift. . See more details in the attached pbix.
SHIFT ON = IF ( HOUR ( yourTable[DATE] ) >= 17, DATEVALUE ( yourTable[DATE] ), IF ( HOUR ( yourTable[DATE] ) <= 13, DATEVALUE ( yourTable[DATE] ) - 1, BLANK () ) )
Hey, where's the question? Maybe itemised what you want to achieve and we try to help.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |