filmov
tv
Power BI - DAX function - DATEADD

Показать описание
The DATEADD function in DAX is a time intelligence function that can be used to add or subtract a specified number of intervals from a date. The syntax for the DATEADD function is:
DATEADD(dates,number_of_intervals,interval)
The dates argument can be a reference to a date/time column, a table expression that returns a single column of date/time values, or a Boolean expression that defines a single-column table of date/time values.
The number_of_intervals argument specifies the number of intervals to add or subtract from the date. The interval argument specifies the type of interval to add or subtract.
For example, the following formula would return the date that is 30 days after the current date:
=DATEADD(Today(),30,day)
The DATEADD function can be used to perform a variety of date-related calculations, such as calculating the previous or next month's sales, or calculating the sales for a specific quarter.
DATEADD(dates,number_of_intervals,interval)
The dates argument can be a reference to a date/time column, a table expression that returns a single column of date/time values, or a Boolean expression that defines a single-column table of date/time values.
The number_of_intervals argument specifies the number of intervals to add or subtract from the date. The interval argument specifies the type of interval to add or subtract.
For example, the following formula would return the date that is 30 days after the current date:
=DATEADD(Today(),30,day)
The DATEADD function can be used to perform a variety of date-related calculations, such as calculating the previous or next month's sales, or calculating the sales for a specific quarter.