Time-Shifted Comparisons in Dashboard Widgets
- Dominant language
- Python
- Stars
- 44.8k
- Forks
- 4.9k
- Avg merge
- 21h 10m
- Merged PRs (30d)
- 635
Description
### Problem Statement
Currently it is not possible in Dashboards to compare a metric’s current value against a previous time period (e.g. 7 days ago, previous week, previous month) within a single widget.
While time-series charts allow users to visually inspect trends, there is no built-in way to display “value X time ago” which would allow for a direct comparison within the same widget to more easily visualize whether a metric has improved or regressed. Users must manually interpret charts
Requested in internal ticket [#181220](https://sentry.zendesk.com/agent/tickets/181220)
### Solution Brainstorm
Allow queries to be offset by a relative time window IE -7d, -1w, -1mo
This would enable comparing current vs historical values in the same widget and overlaying shifted series in time-series charts.
Another option would be to allow formulas using shifted queries for example:
current - previous
(current / previous) - 1
### Product Area
Dashboards
Contributor guide
Research direction
No files, tests, or entry points are named. Start by reviewing the Dashboards query and widget flow, then clarify whether relative offsets or shifted-query formulas are intended; done means a widget can compare current and prior periods.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- analytics, data-visualization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100