A date range comparison gives a metric context. Instead of showing only current-period sales, a dashboard compares them with a selected reference period so users can judge whether performance improved or declined. section 7.4
Build the comparison in three practical steps:
- Let users choose a comparison type such as MoM, QoQ, YoY, or Previous period with a select box. section 7.4.1
- Calculate the reference dates by subtracting one month, three months, one year, or the main range length from both endpoints. section 7.4.1
- Filter a second dataset using the same non-date filters, calculate the metric again, and display its percentage change beside the main value. section 7.4.2
August compared with July
For a main range of August 1–31, 2024 and a comparison range of July 1–31, 2024, calculate sales separately. If August sales are $5M and July sales are $4M, show August sales as up 20% from the comparison period. section 7.4.2
Figure 7.7 Sales for RoyalQuill were $1.32M, but there’s no indication of whether that’s good or what the sales were in a previous comparable period.
Use the dashboard screenshot to identify the problem a comparison solves: a sales total alone does not indicate whether performance is good or bad. section 7.4
