Skip to main content
Skip table of contents

DATEADD

The DATEADD function generates a new date value in the future or past based on elements of an existing date value (Today(), Invoice_Date, etc.). This can be used in either a dimension filter calculation or a conditional measure calculation.

The arguments of the DATEADD function are DATEADD (date_part, interval, source_date)
The interval can be either a positive or negative number for future or past.

Here is an example of a DATEADD calculation to show 3 months in the future from Today’s date
DATEADD( 'month', 3, Today())

The output of this function can be used in a filter calculation to only select invoice dates 3 months in the future.

Here is an example of a DATEADD calculation to show 3 months in the past from Today’s date
DATEADD( 'month', -3, Today())

The output of this function can be used in a filter calculation to only select invoice_dates in the last 3 months.
invoice_date >= DATEADD ('month', -3, Today())

Tableau Help: DATEADD, Date_Part Reference

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.