Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Sample Data:
Employee | Date | State | Start Time | End Time | Duration | Indicator (The expected calculated column) |
Employee 15 | 3/8/2024 | IB | 12:14:00 PM | 12:18:00 PM | 0:00:04:00 | |
Employee 17 | 3/8/2024 | IB | 12:14:00 PM | 12:18:00 PM | 0:00:04:00 | |
Employee 20 | 3/8/2024 | Internal | 12:14:00 PM | 12:15:00 PM | 0:00:01:00 | |
Employee 10 | 3/8/2024 | IB | 12:14:00 PM | 12:15:00 PM | 0:00:01:00 | |
Employee 12 | 3/8/2024 | NotReady | 12:15:00 PM | 12:17:00 PM | 0:00:02:00 | |
Employee 2 | 3/8/2024 | Waiting | 12:15:00 PM | 12:16:00 PM | 0:00:01:00 | |
Employee 10 | 3/8/2024 | ACW | 12:15:00 PM | 12:16:00 PM | 0:00:01:00 | |
Employee 11 | 3/8/2024 | OB | 12:15:00 PM | 12:16:00 PM | 0:00:01:00 | |
Employee 19 | 3/8/2024 | ACW | 12:15:00 PM | 12:17:00 PM | 0:00:02:00 | |
Employee 7 | 3/8/2024 | ACW | 12:15:00 PM | 12:18:00 PM | 0:00:03:00 | |
Employee 20 | 3/8/2024 | Waiting | 12:15:00 PM | 12:30:00 PM | 0:00:15:00 | |
Employee 18 | 3/8/2024 | Waiting | 12:16:00 PM | 12:41:00 PM | 0:00:25:00 | |
Employee 10 | 3/8/2024 | Waiting | 12:16:00 PM | 12:17:00 PM | 0:00:01:00 | |
Employee 13 | 3/8/2024 | ACW | 12:16:00 PM | 12:18:00 PM | 0:00:02:00 | |
Employee 6 | 3/8/2024 | Waiting | 12:16:00 PM | 12:19:00 PM | 0:00:03:00 | |
Employee 10 | 3/8/2024 | ACW | 12:16:00 PM | 12:19:00 PM | 0:00:03:00 | |
Employee 14 | 3/8/2024 | Waiting | 12:16:00 PM | 12:24:00 PM | 0:00:08:00 | |
Employee 2 | 3/8/2024 | IB | 12:16:00 PM | 12:25:00 PM | 0:00:09:00 | |
Employee 11 | 3/8/2024 | Waiting | 12:16:00 PM | 12:34:00 PM | 0:00:18:00 | 1 |
Employee 19 | 3/8/2024 | Waiting | 12:17:00 PM | 12:25:00 PM | 0:00:08:00 | |
Employee 19 | 3/8/2024 | IB | 12:25:00 PM | 12:36:00 PM | 0:00:11:00 | 2 |
Employee 11 | 3/8/2024 | Internal | 12:34:00 PM | 12:35:00 PM | 0:00:01:00 | |
Employee 11 | 3/8/2024 | ACW | 12:35:00 PM | 12:36:00 PM | 0:00:01:00 | |
Employee 7 | 3/8/2024 | Consult | 12:35:00 PM | 12:36:00 PM | 0:00:01:00 | |
Employee 24 | 3/8/2024 | ACW | 12:35:00 PM | 12:36:00 PM | 0:00:01:00 | |
Employee 17 | 3/8/2024 | IB | 12:35:00 PM | 12:38:00 PM | 0:00:03:00 | |
Employee 26 | 3/8/2024 | NotReady | 12:35:00 PM | 12:39:00 PM | 0:00:04:00 |
Example highlighted in the table above:
[Emlpoyee 11] was in "Waiting" state between 12:16:00 PM up to 12:34:00 PM
Then [Employee 19] was in "Waiting" state at 12:17:00 PM.
Then [Employee 19] switched to "IB" state before the [Employee 11] at 12:25 PM.
Requirement: A calculated column that returns 1 or 2:
Return 1 for the [Employee 11]
Return 2 for the [Employee 19]
In other words, assign value 1 to the first employee (in our example [Employee 11]) waiting and while that first employee was waiting, there was another employee which switch to a different state before the first employee waiting.
And assign a value 2 to any employee (in our example [Employee 19] that switched to any of the following states before the first employee waiting:
[State] = "OB"
or [State] = "IB"
or [State] = "Internal"
or [State] = "Consult"
IMPORTANT: In our example, [Employee 19] was not in "Waiting" status right before [Employee 11] went on "Waiting" status. This needs to be part of the criteria as well.
NOTE:
The criteria will ignore scenarios where the waiting duration was 1 minute only as there are no seconds provided in the data.
The main purpose is to isolate this scenario out of the rest of the events. This calculated column will be used later on for a conditional formating in a Matrix.
Desired result example:
Any other ideas are more than welcome.
Solved! Go to Solution.
1. @lbendlin What visual is this?
2. How did you add the Start and End DateTime to the x-axis?
This visual is good. I only want to be able to highlight the scenario mentioned before.
What happens is that while one employee was "Waiting" another one switch from state. The logic should be that the "Waiting" employee should have changed from state before anybody else. The employees 11 and 19 were only a spotted example. The main purpose of the visual is to be able to highlight this scenario every time it happens and to avoid to search for the scenario.
That visual is a simple Deneb based bar chart but with two X axis values (from and to). I can post the Vega Lite code if you like.
Not following your logic at all. Meanwhile here is a graphical representation. What is so special about employees 11 and 19?
User | Count |
---|---|
103 | |
87 | |
77 | |
70 | |
69 |
User | Count |
---|---|
113 | |
99 | |
97 | |
72 | |
68 |