[]
        
(Showing Draft Content)

Time Intelligence Functions

The time intelligence function creates calculations that use built-in knowledge about calendars and dates. You can build meaningful comparisons across comparable periods for sales, inventory, etc. by using time and date ranges in combination with aggregations or calculations.

DATEADD


Description


The DATEADD function returns a date, shifted either forward or backward in time by the specified number of intervals from the dates in the current context.


Syntax

DATEADD(<dates>,<number_of_intervals>,<interval>)

Parameters

Parameter

Description

dates

A column that contains dates.

number_of_intervals

An integer that specifies the number of intervals to add to or subtract from the dates.

interval

The interval by which to shift the dates. The value for interval can be one of the following: year, quarter, month, or day.

Return Value


A date or datetime value.


Example

DATEADD('Sale'[SaleDate],1,YEAR)

The above example will add the time in the SaleDate column, which is offset backward by 1 year.


Remarks

The return value of this function is a scalar value.