DATESBETWEEN function



Description

Returns a table that contains a column of dates that begins with the start_date and continues until the end_date.

Syntax

DATESBETWEEN (<dates>, <start_date>, <end_date>) 

Parameters

Sr.No. Parameter & Description
1

dates

A column that contains dates.

2

start_date

A date expression.

3

end_date

A date expression.

Return Value

A table containing a single column of date values.

Remarks

  • If start_date is a blank date value, then start_date will be the earliest value in the dates column.

  • If end_date is a blank date value, then end_date will be the latest value in the dates column.

  • The dates used as the start_date and end_date are inclusive.

  • If the sales occurred on October 1 and December 31 and you specify October 1 as the start date and December 31 as the end_date, then sales on October 1 and December 31 are counted.

Example

= CALCULATE (
   SUM (Sales[Sales Amount]), DATESBETWEEN (Sales[Date], DATE (2015,1,1), DATE (2015,3,31))
)
dax_functions_time_intelligence.htm
Advertisements