From the course: Advanced Power BI: DAX Language, Formulas, and Calculations

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

DATE, YEAR, MONTH, and DAY date DAX functions

DATE, YEAR, MONTH, and DAY date DAX functions

- [Instructor] Our DAX measures can return values of different data types whether that's a number, text label, date, or even a Boolean. DAX can give us some amazing time intelligence calculation capabilities, but inputting dates into DAX that aren't already part of the data imported through Power Query can be tricky. Unlike Excel DAX data types aren't implicitly converted but rather we have to explicitly define them by specifically telling the model that it's a date. The date DAX function is quite helpful in many of these data model calculations because it returns a measure result stored as a date data type in our Power BI model. The inputs for the date function are the year, month, and day as three separate input parameters in that order. We can use measures as inputs for this function as well as values. Conversely, if we want to extract the individual date components from an existing date in the model we can use…

Contents