# Hint using timeline or calendar view to tracking the plan vs actual in shifts management

**URL:** https://community.fibery.io/t/hint-using-timeline-or-calendar-view-to-tracking-the-plan-vs-actual-in-shifts-management/6082
**Category:** Misc
**Created:** [April 15, 2024, 9:13am UTC](https://community.fibery.io/t/hint-using-timeline-or-calendar-view-to-tracking-the-plan-vs-actual-in-shifts-management/6082 "2024-04-15T09:13:58Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![Minh\_Tri\_Do\_Hang](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/minh_tri_do_hang/32/6791_2.png) [@Minh\_Tri\_Do\_Hang](https://community.fibery.io/u/Minh_Tri_Do_Hang)
#### Post date: [April 15, 2024, 9:13am UTC](https://community.fibery.io/t/hint-using-timeline-or-calendar-view-to-tracking-the-plan-vs-actual-in-shifts-management/6082/1 "2024-04-15T09:13:59Z")

</div>

Here’s an plan which I assigned 2 shifts for 2 employee. Example Date 23/10/2024: Employee 1 ‘ll work from 7am → 7pm & Employee 2’ ll work from 10 am → 10 pm

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/3/3be86ea395464375b6c3217682c870b5aeed662d.png)

In real life, Employee 2 can swap shift with Employee 1, so Employee’ll change to work from 10am → 10pm and employee 1’ ll change 7am → 7pm  
How should I using timeline or calendar to see this difference between plan vs actual ?

For more complex use case, On date 23/10/2024 Employee 1 have planned shift from 7am → 7pm, but in actual: Employee 2 take 7am → 10am, Employee 3 take from 10 am → 2pm, and then Employee 1 actual work from 2pm → 7pm …

I dont wanna break into 2 view: plan and actual shifts, I need it’s overlap to see overall. How should i use timeline view to have an overview for this ?

---

<div class="post-metadata">

### Author: ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)
#### Post date: [April 15, 2024, 9:17am UTC](https://community.fibery.io/t/hint-using-timeline-or-calendar-view-to-tracking-the-plan-vs-actual-in-shifts-management/6082/2 "2024-04-15T09:17:09Z")

</div>

Have you considered using the ‘Add secondary dates’ options in timeline view?  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/1/1b7132dc4d32303c56371cfbbcf16bf54747d642.png)

You could have a date time range field for ‘actual hours worked’

---

<div class="post-metadata">

### Author: ![Minh\_Tri\_Do\_Hang](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/minh_tri_do_hang/32/6791_2.png) [@Minh\_Tri\_Do\_Hang](https://community.fibery.io/u/Minh_Tri_Do_Hang)
#### Post date: [April 15, 2024, 9:23am UTC](https://community.fibery.io/t/hint-using-timeline-or-calendar-view-to-tracking-the-plan-vs-actual-in-shifts-management/6082/3 "2024-04-15T09:23:22Z")

</div>

the problem’s not come from time fields only Chris  
You can see in this example “On date 23/10/2024 Employee 1 have planned shift from 7am → 7pm, but in actual: Employee 2 take 7am → 10am, Employee 3 take from 10 am → 2pm, and then Employee 1 actual work from 2pm → 7pm …”  
1 orginal date range can split into 3 parts ⇄ 3 date range with different people field assigned

---

<div class="post-metadata">

### Author: ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)
#### Post date: [April 15, 2024, 9:35am UTC](https://community.fibery.io/t/hint-using-timeline-or-calendar-view-to-tracking-the-plan-vs-actual-in-shifts-management/6082/4 "2024-04-15T09:35:05Z")

</div>

How about this:  
you use the primary date fields to show actual hours worked and the secondary date fields to show the planned ones.  
For people who were not planned to work, but did, the secondary field can be empty.

In most cases, the date fields will be the same (perhaps you need an automation to copy the secondary field values to the primary by default).

You can modify peoples field values manually if needed, and you can create new extraordinary entities to cover the case where people take on an extra unplanned shift.

---

<div class="post-metadata">

### Author: ![Minh\_Tri\_Do\_Hang](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/minh_tri_do_hang/32/6791_2.png) [@Minh\_Tri\_Do\_Hang](https://community.fibery.io/u/Minh_Tri_Do_Hang)
#### Post date: [April 15, 2024, 9:45am UTC](https://community.fibery.io/t/hint-using-timeline-or-calendar-view-to-tracking-the-plan-vs-actual-in-shifts-management/6082/5 "2024-04-15T09:45:53Z")

</div>

> [@Chr1sG](#):
>
> you use the primary date fields to show actual hours worked and the secondary date fields to show the planned ones.

Wow, clever suggestion as always, Chris  
You’re right, most cases actual = planned, but What condition should I use for this automation “you need an automation to copy the secondary field values to the primary by default”

> [@Chr1sG](#):
>
> You can modify peoples field values manually if needed, and you can create new extraordinary entities to cover the case where people take on an extra unplanned shift.

In this thing, You mean from 1 orginal entity with daterange (planned shift) I can break into 3 entities with different date-range and employee right, so I need to self-auto relation in this database ?

other things, current Shift timing 's formula type, How should I convert to Date type to selectable for those new extraordinary entities ?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/4/49adba0623d58b056221f4950033d6790a9f51bc.png)

---

<div class="post-metadata">

### Author: ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)
#### Post date: [April 15, 2024, 9:52am UTC](https://community.fibery.io/t/hint-using-timeline-or-calendar-view-to-tracking-the-plan-vs-actual-in-shifts-management/6082/6 "2024-04-15T09:52:25Z")

</div>

Why not trigger when the secondary field gets updated?

---

<div class="post-metadata">

### Author: ![Minh\_Tri\_Do\_Hang](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/minh_tri_do_hang/32/6791_2.png) [@Minh\_Tri\_Do\_Hang](https://community.fibery.io/u/Minh_Tri_Do_Hang)
#### Post date: [April 15, 2024, 9:55am UTC](https://community.fibery.io/t/hint-using-timeline-or-calendar-view-to-tracking-the-plan-vs-actual-in-shifts-management/6082/7 "2024-04-15T09:55:55Z")

</div>

> [@Chr1sG](#):
>
> You can modify peoples field values manually if needed, and you can create new extraordinary entities to cover the case where people take on an extra unplanned shift.

In this thing, You mean from 1 orginal entity with daterange (planned shift) I can break into 3 entities with different date-range and employee right, so I need to self-auto relation in this database ?

other things, current Shift timing 's formula type, How should I convert to Date type to selectable for those new extraordinary entities ?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/4/49adba0623d58b056221f4950033d6790a9f51bc.png)

---

<div class="post-metadata">

### Author: ![Minh\_Tri\_Do\_Hang](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/minh_tri_do_hang/32/6791_2.png) [@Minh\_Tri\_Do\_Hang](https://community.fibery.io/u/Minh_Tri_Do_Hang)
#### Post date: [April 15, 2024, 1:09pm UTC](https://community.fibery.io/t/hint-using-timeline-or-calendar-view-to-tracking-the-plan-vs-actual-in-shifts-management/6082/8 "2024-04-15T13:09:13Z")

</div>

Not sure I’m doing right, how can I break 1 planned entity to 3 actual entities for 3 employee ?  
I just can get 1 actual only like this

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/b/bcb2532ab623947f7c43ea8817bb75c1dadd42f2.png)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/5/524436b733915712beb49380de4d85292b7839a6.png)

---

<div class="post-metadata">

### Author: ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)
#### Post date: [April 15, 2024, 1:15pm UTC](https://community.fibery.io/t/hint-using-timeline-or-calendar-view-to-tracking-the-plan-vs-actual-in-shifts-management/6082/9 "2024-04-15T13:15:58Z")

</div>

> [@Minh\_Tri\_Do\_Hang](#):
>
> In this thing, You mean from 1 orginal entity with daterange (planned shift) I can break into 3 entities with different date-range and employee right, so I need to self-auto relation in this database ?

I don’t think you need any new relations.  
I was just thinking that if you had 1 entity to begin with, e.g.

- Employee A - planned 05-17, actual 05-17  
you would end up with three entities
- Employee A - planned 05-17, actual 05-09
- Employee B - planned xx-xx, actual 09-12
- Employee C - planned xx-xx, actual 12-17

xx means null

It would look something like this

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/e/ef7bd9fa9fb87161211ebac0f20edc5c3553223e.png)

> [@Minh\_Tri\_Do\_Hang](#):
>
> current Shift timing 's formula type, How should I convert to Date type to selectable for those new extraordinary entities ?

If you create an ‘extraordinary’ Shift entity manually, there will be no Shift pattern, and the formula for calculating the planned Shift timing will be empty if there is no assigned Shift pattern.

(on the above image, there are no secondary dates for the time that Chris and Mary worked)

---

<div class="post-metadata">

### Author: ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)
#### Post date: [April 15, 2024, 1:16pm UTC](https://community.fibery.io/t/hint-using-timeline-or-calendar-view-to-tracking-the-plan-vs-actual-in-shifts-management/6082/10 "2024-04-15T13:16:52Z")

</div>

Just to emphasise:

> [@Chr1sG](#):
>
> you use the primary date fields to show **actual hours worked** and the secondary date fields to show the **planned ones**.

---

<div class="post-metadata">

### Author: ![Minh\_Tri\_Do\_Hang](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/minh_tri_do_hang/32/6791_2.png) [@Minh\_Tri\_Do\_Hang](https://community.fibery.io/u/Minh_Tri_Do_Hang)
#### Post date: [April 15, 2024, 1:27pm UTC](https://community.fibery.io/t/hint-using-timeline-or-calendar-view-to-tracking-the-plan-vs-actual-in-shifts-management/6082/11 "2024-04-15T13:27:31Z")

</div>

> [@Chr1sG](#):
>
> I don’t think you need any new relations.

this thing 's really make me confused. If not a self-relations, it’s really hard to determine which actual belongs to main entity  
Can any have solution with relation for this in an overlap way (1 row planed and 3 actual in 1 way)  
Employee A - planned 05 → 17, actual 05 → 17

- Sub Employee A - planned xx-xx, actual 05 → 09
- Sub Employee B - planned xx-xx, actual 09 → 12
- Sub Employee C - planned xx-xx, actual 12 → 17

---

<div class="post-metadata">

### Author: ![Minh\_Tri\_Do\_Hang](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/minh_tri_do_hang/32/6791_2.png) [@Minh\_Tri\_Do\_Hang](https://community.fibery.io/u/Minh_Tri_Do_Hang)
#### Post date: [April 15, 2024, 1:45pm UTC](https://community.fibery.io/t/hint-using-timeline-or-calendar-view-to-tracking-the-plan-vs-actual-in-shifts-management/6082/12 "2024-04-15T13:45:43Z")

</div>

I just tried for non self-relation example

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/9/9ec1b2d091e8284406b3870f5dc8e509a958755b.png)  
You can see the employee 9 have planned shift from 10:00 → 22:00, and below’re actual blocks:

- the Employee 1 took from 10:00 → 13:00
- the Employee 9 only take from 13:00 → 18:00
- the Employee 8 take from 18:00 → 21:00 only
- and still missing employee for time block from 21:00 → 22:00 (compared to planned)

If those blocks cant overlaps in 1 row, it’s really hard to determine the last actual missing time-block (21:00 → 22:00)

---

<div class="post-metadata">

### Author: ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)
#### Post date: [April 15, 2024, 2:09pm UTC](https://community.fibery.io/t/hint-using-timeline-or-calendar-view-to-tracking-the-plan-vs-actual-in-shifts-management/6082/13 "2024-04-15T14:09:57Z")

</div>

In your example image, it looks like Employee 8 had a planned shift (07-19) but ended up working for 3 hours of Employee 9’s shift.  
Maybe Employee 8 should have two entities (like Employee 1 does)?

Anyway, that’s not the point.

It is not possible to have in one row all the various periods that were actually worked if you want lanes per employee - these three entities have to live in different lanes.  
Also, the secondary date range will act as a blocker to prevent other entities occupying the same space.

TBH, the simplest thing to do may be to add a checkbox formula which is true if actual != planned and then colour code on the timeline for visibility. So at least you will see deviations clearly.

If you’re trying to find a smart way to automatically identify when a planned shift is not totally covered (like in your example) then yes, you would need to find a way of linking the extraordinary shifts to the planned one, and maybe do some clever formula to find out where any gaps are, but I don’t think it will be easy.

---

<div class="post-metadata">

### Author: ![Minh\_Tri\_Do\_Hang](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/minh_tri_do_hang/32/6791_2.png) [@Minh\_Tri\_Do\_Hang](https://community.fibery.io/u/Minh_Tri_Do_Hang)
#### Post date: [April 15, 2024, 2:24pm UTC](https://community.fibery.io/t/hint-using-timeline-or-calendar-view-to-tracking-the-plan-vs-actual-in-shifts-management/6082/14 "2024-04-15T14:24:35Z")

</div>

Seem I need to re-think about this color code suggestion, Thank you Chris as always!
