• Skip to main content
  • Skip to footer

Curbal

Learn how to grow your business with your data and Power BI

  • Data Stories
    • Power BI Stories
    • 1 dataset, 100 matplotlib visualizations
  • Learning Portal
    • Download Center
    • 25 Days Challenge
    • DAX Glossary
    • Power BI
    • Power BI by Topic
    • Python
    • 1 dataset, 100 matplotlib visualizations
  • Courses
    • Power BI Mini Master Class 1: Using a REST API as a data source
    • Power BI Master Class 1: COVID Tracker
    • Introduction to Power BI – FREE Online course
    • M Language + Power Query Course Bundle
    • Power Query Online Training [updated 2022]
    • M Language Online Course: The unofficial and Practical Reference Guide [updated 2025]
    • My Courses
  • Shop
    • Courses
    • Master Classes
    • Template Apps
    • JSON Themes
  • Cart
  • Register/ Log In
    • Become a Member
    • Log In
    • My account
    • My Courses
  • Search
  • Contact
You are here: Home / CM Tooltip Glossary Pro+ / DATESBETWEEN

DATESBETWEEN

posted on May 4, 2018

« Back to Glossary Index

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.

DAX Fridays! #80: DATESBETWEEN

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.

Was this helpful?
Related Articles:
  • The ultimate dashboard to track your website growth with Google Analytics 4 and Power BI
« Back to Index

Reader Interactions

Comments

  1. markus

    May 21, 2018 at 9:06 am

    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.

    Reply
    • Ruth Pozuelo Martinez

      May 21, 2018 at 4:23 pm

      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

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Footer CTA

Join our community of +50,000 professionals

Become a Member

Subscribe to YouTube

About me:

Curbal AB
Badhusgatan 7B
722 15 – Västerås
Sweden

OrgNo: 5569680852 | VAT: SE556968085201

 

Location:

© Copyright 2014-2025 · Curbal AB · All Rights Reserved · Privacy Policy · Terms of Service · Refund Policy · Log In