When working with time categories or counters in a Jarrison Time day program, typically the current day’s values are used. There may be occasions when the previous day’s result needs to be used instead.
For example to count consecutive days worked. The period accumulator function may be used achieve similar results, if only working within the current period is needed. If passing values between periods (checking last period’s values in the current period) is required, the Previous Day option will be needed.
Below is an example of using the Previous Day function, to determine how many days an employee worked shifts consecutively in a week.
First a “Shift Count” category (any other preferred counter can be created in Setup > Counters) needs to be added. The counter can be set from the Counters tab of Day Programs.
Note that when applying the counter through the Counters tab, the formula to follow must be checked to post-process.
It could also be set from the Rules tab by a formula.
A new category or counter can then be created in which to store the cumulative value. For the formula below, we’ve created a counter called “Consecutive Shifts” and applied the formula accordingly. The counter should be checked as a Running Total. (More on Running Totals can be found at https://www.jarrison.systems/knowledge-base/how-to-use-running-totals/)
In this instance, the “Consecutive Shifts” value will be equal to the Shift Count allocated on the existing day in addition to the Consecutive count of the previous day (if a value is present). Our Only IF condition will ensure that the formula only applies if they are present on the day. Absence will result in the “Consecutive Shifts” value resetting to 0.
With the formulas correctly applied, the counter will increment for each day as seen in the Daily Summary results below.