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.

MTD, QTD, and YTD date DAX functions

MTD, QTD, and YTD date DAX functions

- [Instructor] We can expand date range filters to calculate totals as month-to-date, quarter-to-date, or year-to-date running total numbers. To calculate these running totals, we can use the DAX date filter functions, DARESMTD, DATESQTD, and DATESYTD. Like other filter functions in DAX measures. We want to use these date filters within an aggregation function. Let's calculate the running total of the interest paid as a running total for the year. We'll use the SUMX function as our aggregation. We then need to expand the filter range so that we can calculate the total interest paid, from the first date in the year to the current period, determined by the pivot coordinates as the current date. We don't actually have to reference the pivot coordinates, though, within this function because we just need to reference a single dates column. We'll want to use the same date field that we're using in the pivot coordinates of the…

Contents