Wyn Enterprise User Guide

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.

DATEDIFF


Description

The DATEDIFF 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)