Skip to content

DateShift

DateShift(dateCol, n, unit) · Time intelligence

A modifier for Calculate: evaluates the measure over data shifted by n units of "day" | "week" | "month" | "quarter" | "year" (negative = past), while the chart’s date buckets stay put — each bucket shows the shifted period’s value. Date predicates in the same Calculate pin the output buckets and are not shifted.

Computed in-database with a shifted join, correct at every grain including weeks.

RevenueLY := Calculate([Revenue], DateShift(Date.Date, -1, "year"))
// Year-over-year growth
YoYGrowth := Divide([Revenue] - [RevenueLY], [RevenueLY])
  • Unlike YTD/RollingSum, DateShift composes with any measure — it shifts context rather than accumulating.