- DAX Functions Tutorial
- DAX Functions - Home
- DAX Functions - Introduction
- DAX Parameter Naming Conventions
- Description Structure
- DAX Functions - Aggregation
- DAX Functions - Filter
- DAX Functions - Time Intelligence
- DAX Functions - Date and Time
- DAX Functions - Information
- DAX Functions - Logical
- Math & Trigonometric Functions
- DAX Functions - Parent & Child
- DAX Functions - Statistical
- DAX Functions - Text
- DAX Functions - Other
- DAX Functions Useful Resources
- DAX Functions - Quick Guide
- DAX Functions - Useful Resources
- DAX Functions - Discussion
DAX Date & Time - CALENDARAUTO function
Description
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 the data in the model.
DAX CALENDARAUTO function is new in Excel 2016.
Syntax
CALENDARAUTO ([<fiscal_year_end_month>])
Parameters
Sr.No. | Parameter & Description |
---|---|
1 |
fiscal_year_end_month Any DAX expression that returns an integer from 1 to 12. If omitted, defaults to the value specified in the calendar table template for the current user, if present. Otherwise, defaults to 12. |
Return Value
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.
Remarks
The date range is calculated as follows
The earliest date in the model which is not in a calculated column or calculated table is taken as the MinDate.
The latest date in the model which is not in a calculated column or calculated table is taken as the MaxDate.
The date range returned is dates between the beginning of the fiscal year associated with MinDate and the end of the fiscal year associated with MaxDate.
An error is returned if the model does not contain any datetime values which are not in calculated columns or calculated tables.
Example
= COUNTROWS (CALENDARAUTO ())