CALENDARAUTO Function (DAX)

How does the CALENDARAUTO function (DAX) work?

The CALENDARAUTO function (DAX) returns a table with a single column named “Date” that contains a contiguous set of dates. The range of dates is calculated automatically based on data in the model.

CALENDARAUTO Formula Syntax

CALENDARAUTO(
     [fiscal_year_end_month]
)

How do you use the CALENDARAUTO function?

The CALENDARAUTO function is create date table with a column called “Date”. It will generate a date for current 1 year by default. This above function will only work when you have a model with at least one column with date or datetime data type.

Related Blog Posts

Related Support Forum Posts

Understanding DAX Formula
Developing Complex Dax functions

Considerations when using the CALENDARAUTO function

An error is returned if the model does not contain any datetime values which are not in calculated columns or calculated tables.

Related Video Tutorials

Formula examples using the CALENDARAUTO function

FILTER ( CALENDARAUTO ( 3 ), YEAR ( [Date] ) >= 2015 )

= CALCULATE( [TotalSales], SAMEPERIODLASTYEAR( ‘CALENDARAUTO() DATE'[Date] ) )

GENERATE ( CALENDARAUTO(), VAR currentDay = [Date] VAR day = DAY( currentDay ) VAR month = MONTH ( currentDay ) VAR year = YEAR ( currentDay )

Related Course Modules

Ultimate-Beginners-Guide-To-PowerBI

DOWNLOAD

To access our comprehensive DAX formula reference guide just insert your email address below. The resource will download immediately and we’ll also email it to you.