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.
DATEDIFF DAX function - Power BI Tutorial
From the course: Advanced Power BI: DAX Language, Formulas, and Calculations
DATEDIFF DAX function
Another powerful date or time intelligence function in DAX language is DATEDIFF. It calculates the duration between a start date and an end date in the first and second parameters of the function. The result it returns depends not only on the start date and end date, but also on the time unit interval we specify in the third parameter of the function. The time unit intervals we specify in the DATEDIFF function can be day, hour, minute, month, quarter, second, week or year. If we look at the approach for the loan calculations in model one, we can trace many of the components of these calculations back to the loan period at which we are calculating measures like the interest or principle paid during a given period. The loan period serves as the pivot coordinates for many of these loan calculations. Much like we would refer to a single cell in an Excel formula. However, DAX works on tables and columns instead, which means we…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
SELECTEDVALUE DAX function6m 22s
-
(Locked)
IF DAX function for conditional formulas6m 46s
-
(Locked)
EOMONTH DAX function4m 49s
-
(Locked)
DATEDIFF DAX function4m 34s
-
(Locked)
BLANK and ISBLANK DAX functions6m 33s
-
(Locked)
Filtering between tables5m 10s
-
(Locked)
DAX acrobatics6m 18s
-
(Locked)
GENERATE and ROW DAX functions with calculated dates tables7m 43s
-
(Locked)
DATESBETWEEN DAX function4m 1s
-
(Locked)
DATEADD DAX function4m
-
(Locked)
MTD, QTD, and YTD date DAX functions4m 1s
-
(Locked)
DAX quick measures6m 22s
-
(Locked)
Power BI summarized view5m 43s
-
(Locked)
Challenge: DAX time intelligence modeling27s
-
(Locked)
Solution: DAX time intelligence modeling3m 32s
-
-