A dashboard that always reports “up to today” cannot answer “what did YTD look like at the end of March?”. With a date parameter, the reader picks the reference date, and every period-to-date measure follows it. The default can still be yesterday, so nobody has to touch the control on a normal day.
Copy and paste
The parameter: a Datetime parameter named AsOfDate, time granularity Day, default
Relative date → Yesterday (or Today for data updated during the day). Add a Date picker
control.
YTD, QTD and MTD as of the chosen date:
sumIf({Sales}, {Order Date} >= truncDate('YYYY', ${AsOfDate})
AND {Order Date} < addDateTime(1, 'DD', ${AsOfDate}))
sumIf({Sales}, {Order Date} >= truncDate('Q', ${AsOfDate})
AND {Order Date} < addDateTime(1, 'DD', ${AsOfDate}))
sumIf({Sales}, {Order Date} >= truncDate('MM', ${AsOfDate})
AND {Order Date} < addDateTime(1, 'DD', ${AsOfDate}))
YTD last year, up to the same date:
sumIf({Sales}, {Order Date} >= addDateTime(-1, 'YYYY', truncDate('YYYY', ${AsOfDate}))
AND {Order Date} < addDateTime(1, 'DD', addDateTime(-1, 'YYYY', ${AsOfDate})))
A link that opens the dashboard at a given date:
https://<region>.quicksight.aws.amazon.com/sn/dashboards/<dashboard-id>#p.AsOfDate=2026-03-31T00%3A00%3A00
The part after #p. is the parameter name, not the control’s title. The date format is one of those the
AWS page on URL parameters lists as working.
Why sumIf and not periodToDateSum
periodToDateSum accepts an end date, and the obvious formula is
periodToDateSum({Sales}, {Order Date}, YEAR, ${AsOfDate}). On the QuickSight community forum, a user
building exactly this dashboard reported that passing the date control’s value directly did not give the
expected results, and worked around it by rebuilding the date from now(). The sumIf measures avoid the
question: the range is written out, you can see both bounds in the formula, and they work the same way for
last year’s period.
The upper bound
A Datetime parameter at day granularity holds midnight. {Order Date} <= ${AsOfDate} would keep the
rows of that day only if they have no time. < addDateTime(1, 'DD', ${AsOfDate}) includes the whole day
on date and timestamp fields alike.
The upper bound also matters when the dataset holds rows after the chosen date: everything loaded since, when a reader looks at the end of March in May.
Show the date
Put the parameter in the sheet title or the visual titles, so a screenshot cannot be mistaken for today’s figures: “Sales YTD as of 31 March 2026”. The title editor offers the parameters in its menu.
Keep the date filters off
The measures choose their dates. A date filter on the same visuals would cut the rows before the calculation, and a filter “this year” would empty last year’s measure. If the sheet needs a date filter for other visuals, scope it so that it doesn’t apply to these ones, or connect it to the same parameter.
Related guides
- How to calculate YTD and MTD
- How to compare YTD with prior year YTD
- How to handle 29 February in a prior year comparison
Checked against the Amazon Quick Sight documentation (October 2026).