From the course: Power BI Data Analyst Associate (PL-300) Cert Prep: Create Model Calculations Using DAX

Unlock the full course today

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

Creating dates with CALENDAR and CALENDARAUTO

Creating dates with CALENDAR and CALENDARAUTO

- [Instructor] Date and time functions allow you to create calculations based on dates and time. These functions are similar to the Excel date and time functions. The most common, and probably the one you'll use the most often are the calendar and calendarauto functions. Both return a single column called date, and the range of these dates from a specified start to end date, depending on the parameters of the function. For calendarauto, the date ranges are automatically returned based on the data within the model. So for our starter file, we have the date table here already created using the calendarauto function. So this function detected the existing dates within the model and built a table that can provide analysis on all the available dates. So it's a very flexible way to build a date table. So let's look at the number of rows that we see here. To the bottom left, 1,096 rows. We see that it starts here…

Contents