Skip to main content

Period Comparisons – Comparison Logic

Period Comparisons – Comparison Logic

Objective

This document explains how the KSI VISION platform calculates period-over-period comparisons (the "vs. previous period" variation shown next to indicators) for each of the date range selectors available in the dashboards: Today, Yesterday, This week, Last week, This month, Last 30 days, and Custom range.

The goal is to make clear which reference period is used in each case, so that variations (%) can be interpreted correctly.

General Principle

The platform always compares two periods of equal length and equivalent position in time, to avoid comparing a complete period against a partial one.

  • If the selected period is still in progress (it includes today, up to the current hour — e.g., Today, This week, This month), the comparison period is capped at the same hour, so both periods cover the same elapsed time.
  • If the selected period is already closed (it ended before today — e.g., Yesterday, Last week), the comparison period is also a complete period, with no hour cutoff.
  • Weekly and monthly comparisons preserve day-of-week alignment: the same weekday is always compared against the same weekday (e.g., a Wednesday against a Wednesday), so that weekday/weekend behavior patterns remain comparable.

Comparison Logic by Selector

Selected periodCompared againstHow it works
TodayYesterday, up to the current hourFrom 00:00 to the current hour of today vs. 00:00 to that same hour yesterday.
YesterdayThe day before yesterdayFull day vs. full day (00:00–23:59), since yesterday is already a closed period.
This weekLast week, up to the current day and hourFrom the start of the current week to now vs. the same days/hours of the previous week.
Last weekThe week before lastFull week vs. full week, since last week is already closed.
This monthLast month, up to the current day and hourFrom day 1 of the current month to now vs. the equivalent range of the previous month.
Last 30 daysThe 30 days immediately before thatTwo complete, equal-length 30-day blocks, placed back-to-back.
Custom rangeThe immediately preceding range of equal lengthThe comparison window is shifted backward by the exact duration of the selected range. If the custom range includes today (still in progress), the same-hour cutoff described above also applies.

Examples

Today — If "now" is Wednesday, July 9 at 14:32:

  • Selected period: Jul 9, 00:00 → 14:32
  • Comparison period: Jul 8, 00:00 → 14:32

This week — Same moment, with the week starting on Monday:

  • Selected period: Jul 6 (Mon), 00:00 → Jul 9 (Wed), 14:32
  • Comparison period: Jun 29 (Mon), 00:00 → Jul 1 (Wed), 14:32

Custom range (closed) — User selects Jun 1–15 (15 full days):

  • Comparison period: May 17–31 (the 15 days immediately before)

Custom range (in progress) — User selects Jul 1 → today (Jul 9, 14:32), a 9-day range:

  • Comparison period: Jun 22, 00:00 → Jun 30, 14:32 (the previous 9 days, capped at the same hour)

Important Considerations

Note

  • The comparison period is calculated automatically; it cannot be selected manually.
  • If the comparison period doesn't have enough historical data (e.g., a store that recently opened, or a location without cameras installed yet), the variation may not be available.
  • Because "Today," "This week," and "This month" are always capped at the current hour, the variation shown for these ranges will keep changing throughout the day as more data is collected.

Support

For questions about how a specific comparison is calculated:

📧 ksi.support@ksivision.com