Power Fx function
DateAdd — Power Fx function reference
Add a span to a date.
Syntax
powerfx
DateAdd( Date, NumberOfUnits [, Unit ] )
Examples
powerfx
DateAdd(Today(), 7, TimeUnit.Days)
→ One week out
powerfx
DateAdd(Today(), -7, TimeUnit.Days)
powerfx
DateAdd(StartDate, 3, TimeUnit.Months)
Common mistakes & gotchas
- Unit defaults to TimeUnit.Days if omitted; use a negative NumberOfUnits to subtract — there is no separate DateSubtract function.
- Adding Months/Years accounts for varying month lengths (Jan 31 + 1 month lands on the last valid day of February), which is easy to overlook if you expect a fixed 30-day step.
Related Power Fx functions
From Date & time