Syntax
DATESBETWEEN(<dates>,<start_date>,<end_date>)
Tutorial with example
In todays video we are going to cover the DAX function DATESBETWEEN.
DATESBETWEEN function allows you to calculate amounts between two dates you specify.
For example, if you want to calculate the sum of sales between two specific dates, this is the perfect function for you.
You can “hardcode” the dates or you can specify the dates dynamically, both options are possible.
DATESBETWEEN DAX function will give the same results as DATESINPERIOD DAX function when you are rolling dates backwards, but the main difference is that DATESBETWEEN allows you to specify a start and end date while DATESINPERIOD allows you to specify an end date and then an interval to roll it backwards.
Links to the mentioned resources
To get the files:1. Go to Curbal Download Center > Dax Fridays
2. Get File #80
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: that is, if the sales occurred on September 1 and you use September 1 as the start date, sales on September 1 are counted.
This DAX function is not supported for use in DirectQuery mode.
Hello, I have some problem, I am searching for a option. My goal is to Count Days between Sales Date and arrive Date, but my problem is, that weekends and public vacation should not be count. Perhaps you can help me. Thanks for your support.
Hi Markus,
I have a few videos that my help you:
https://www.youtube.com/watch?v=GLIoDbOiJgw
https://www.youtube.com/watch?v=9M1V_m-oEzc&vl=en
/Ruth